jQuery.Live |
[eluser]Philo01[/eluser]
Hi there! I'm working on a jQuery plugin for my application. Somehow jQuery Live works for if I use it to check if a form is submitted: Code: $(o.submitForm).live("submit",function() Now I also monitor a button using the following code: Code: $(this).click(function () { This works, but I need it work after content is loaded via ajax. Normally I would use the live method like this: Code: $(this).live("click",function() { But somehow this is not working. Does anyone know if this has to do because its written in a plugin? Kind regards, Philo Edit ----------- Somehow this works: Code: $('#user_list .edit').ajaxForms({ If I then call this config: Code: $(o.button).live("click",function() { This is kinda wierd because "this" links to the same object as I defined manualy in the button config"#user_list .edit".
[eluser]Philo01[/eluser]
[quote author="InsiteFX" date="1260745609"]$(document).ready( function() { Enjoy InsiteFX[/quote] Thanks but already had that around my code So that isn't the problem, thanks though. Kind regards, Philo
[eluser]ggoforth[/eluser]
I'm not exactly sure about your problem, but from the documentation, "submit" is not a valid live event (yet). I hear in the newest version of jQuery it will be supported, but it's not currently showing on the website as being supported. Could this be why it's not working? http://docs.jquery.com/Events/live |
Welcome Guest, Not a member yet? Register Sign In |