Reputation: 15925
I have the following script which works perfectly until I regenerate the links ".resultLink" via jquery ajax:
$("a.resultLink").live('click', function()
{
var that = this;
$.ajax({
url: 'most_used.aspx',
type: 'POST',
data: { strMostUsedID:$(that).attr("href") },
error: function() { },
success: function() { }
});
});
"live" normally fixes this for me but this time it did not. Not sure what I am doing wrong.
Upvotes: 0
Views: 182
Reputation: 630549
The most likely cause I can think of is the selector not matching, double check that the .resultLink
class is being applied to the new links...if it's not the .live()
handler won't match the selector.
Upvotes: 2