views:

24

answers:

1

Hey

I've got a question about jqueryy 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?

I'd be very happy if someone helps me solve this problem.

A: 

I've solved the problem. The function .live() was the solution.

  $(".add").live("click", function() {
      var user = $(this).text();
      $("#addedUser").append(user+" ");
  });  
Damian