更新时间:1970-01-01 07:56:24
$("input[name='htmlcode'], input[name='directlink'], input[name='emaillink'], input[name='imgcode']").live('mouseover', function() {
clip = new ZeroClipboard.Client();
clip.setHandCursor( true );
clip.setText($(this).val());
var width = $(this).width();
var height = $(this).height()+10;
var flash_movie = '<div>'+clip.getHTML(width, height)+'</div>';
// make your own div with your own css property and not use clip.glue()
flash_movie = $(flash_movie).css({
position: 'relative',
marginBottom: -height,
width: width,
height: height,
zIndex: 101
})
.click(function() { // this puts copied indicator for showing its been copied!
$(this).next('input').indicator({className: 'copied', wrapTag: 'div', text: 'Copied!', fadeOut: 'slow', display: 'after'});
});
$(this).before(flash_movie); // if you want to put after and not before, then you have to change the marginBottom to marginTop
});