I am using the jQuery live search plugin and need to bind it to all instances of a class. My class instances may or may not be dynamic.
I know I can accomplish binding it to the dynamic class instances by nesting it within a jQuery Live function, E.G $(".myLink").live(click function(){});
However, I also need the non dynamic classes to have the binding as well.
How can I accomplish this without defining my liveSearch binding twice? (Once at document ready for the static elements, and once in my click handler for the dynamic elements).
Here's my liveSearch code, not sure if it matters.
$(".myClass").liveSearch({
url: 'foo.php',
id: 'liveSearchID',
parent: '.myParent',
});
Thanks much.