[jQuery] Understanding the correct approach for binding plugins
My normal approach for binding is this: After AJAX injecting new
content, inside a load() callback function, do the bind.
This works fine for something like:
$('.link-name').bind('click', function(){
alert('test');
return false;
});
But the same does not work when I am trying to bind any of my plugins:
$('.video-dom-window').bind('click', function(){
$('.video-dom-window').openDOMWindow({
height:450,
width:450,
eventType:'click',
windowSource:'iframe'
});
});
Can someone please help me understand the proper treatment for
plugins? Many thanks!