开发者

jQuery cycle plugin - how to use .live() with its onPagerEvent?

开发者 https://www.devze.com 2023-02-09 21:21 出处:网络
I\'m inser开发者_如何学运维ting elements into the DOM when the onPagerEvent is called. Is there a way to use .live() with this event so that I can access these new elements? Cycle plugin: http://jquer

I'm inser开发者_如何学运维ting elements into the DOM when the onPagerEvent is called. Is there a way to use .live() with this event so that I can access these new elements? Cycle plugin: http://jquery.malsup.com/cycle/

$("#slides").cycle({
  ...
  onPagerEvent: show_slide(),
  ...
});

function show_slide() {
  // create new object and add to DOM ... 
  var img = new Image();
  img.className = 'new_image';
  $('psd').html(img);
}

$('.new_image'); //won't work of course!
0

精彩评论

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