i’ve made some little widget-plugins which are getting applied to eg. a textbox
like $(“input.txtbox”).myTextbox();
now i’m using ajax for dynamically loading content and i was wondering:
is there a way to use jquery’s live function for auto-applying that plugin to each textbox which will be loaded via ajax?
thanks
You can’t use
.live()but you can set up a globalajaxSuccessorajaxCompletehandler.You might want to make this more efficient by not re-initializing the plugin on inputs which already have been initialized; something like