ajax - jQuery: using .live method also for elements/plugins? -
I have created a simple jQuery button widget that starts like this:
< Code> var cmd = $ (".tibbutton"); Cmd.tButton (); There is no way to use
. Leave all future buttons (Loading through AJAX)?
thx
You can do it, but be careful what you do Are there. If you want to connect your plugin to run the code automatically, then $ .fn.live ()
is not what you want.
If you are adding some event handlers, you can, but you have to attach it to the main archive:
$ .fn.yourPlugin = function () {This.live ('click', function ()} ..}}; }
Comments
Post a Comment