jQuery code doesn't work when normally run. But i does with breakpoints activated.
- by Dante
Hi,
I have the following code in my application:
$(".deleteproduct").click(function() {
id = this.id;
alert("id: " + id);
});
If i run my site nothing happens when I click on an element with the class deleteproduct. But when I place breakpoints before line 1,2 and 3 it works like a charm.
The elements with class deleteproduct are loaded through AJAX call right behind $(document).ready(function(). The .click code is underneath it.
This seems really weird to me. It's working if breakpoints in Firebug are used, but not when there are not...