problem about binding third party's plugin to element which created dynamically
I used one jquery plugin for image slider show (
http://leandrovieira.com/projects/jquery/lightbox). This plugin can be used as :
$('#gallery a').lightBox(). all I need is providing the jquery selector for some image link.
But the problem is those image elements was inserted into DOM dynamically by ajax processing. If I reference it directly by "
('#gallery a')", I get nothing. I know jquery has one method called "delegate" can be bind event handler to dynamically created elements. but seems "delegate" can only
bind some specific event type like "click" or "hover", how to bind it to my "lightBox()"??
Thanks!