I'm writing some javascript using jQuery to call a method on all nodes with class datepicker
.
Here's what I have:
$('.datepicker').my_method();
This works as expected - it calls my_method
.
However, I want to be able to call my_method
on all new nodes that are inserted into the DOM with the class datepicker
.
I want similar functionality to the .live
method, without specifying an eventType
.
How do I go about this?