I have some ajax that pulls information into a table and i am trying to use livequery to add a class to every second row
$('a').livequery('click', function(event) {
$(".scroll-pane table tr:odd").addClass("Odd");
});
The problem is that the class is only added for a short period of time and then it simply vanishes?
I am using jquery 1.4.1 and Livequery 1.0.3
You no longer need to use the livequery plugin with jquery 1.4.x. Use the
livemethod instead.Alternatively, you can rebind the click/set the class after each ajax call in the success callback.
If you are stuck with legacy livequery code you cant change, then you need to use livequery 1.1 or later but I dont recommend this.