开发者

How to use live method with zclip plugin?

How to use live开发者_JS百科 method with this -> http://www.steamdev.com/zclip/

Edit:

$(document).ready(function(){
$('a#copy-description').zclip({
path:'js/ZeroClipboard.swf',
copy:$('p#description').text()
});

i need to use live method cuz a#copy-description will be generate via javascript.


try to use livequery instead of live. That way you'll be able to bind zclip when it appears in the DOM.

$(document).ready(function(){ 
  $('a#copy-description').livequery(function(){
     $(this).zclip({ path:'js/ZeroClipboard.swf', copy:$('p#description').text();
  });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜