Jquery Tablesorter 2.0 issue
I've got a question about jQuery plugin tablesorter 2.0.
I'm using it to display all users from my database.
Columns:
Name, Firstname, Initial, Department
Each initial should be clickable.
For testing, I added following code:
$("#initial a").click(function() {
var userInitial = $(this).text();
$("#addedUser").append(userInitial);
});
The problem is, this only works with the first page (10 users).
So if I go on the second page (or change items/site to 20) the new initials which are shown now aren't clickable. You can still just click the first 10 initials. Why?
开发者_如何学PythonI'd be very happy if someone helps me solve this problem.
I've solved the problem. The function .live() was the solution.
$(".add").live("click", function() {
var user = $(this).text();
$("#addedUser").append(user+" ");
});
精彩评论