Welcome Guest, Not a member yet? Register   Sign In
jQuery e.preventDefault(); stops working after reloading div
#5

[eluser]Unknown[/eluser]
As you are adding new content to the DOM, it will not automatically have event handlers applied to it. You need to use the live method which allows for the binding of event handlers to all elements that match a selector, including those created in the future.

Code:
$("a.delete").live("click", function(e) {  
    e.preventDefault();
});


Messages In This Thread
jQuery e.preventDefault(); stops working after reloading div - by El Forum - 05-03-2012, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB