jQuery cycle plugin - how to use .live() with its onPagerEvent?
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!
精彩评论