• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 627
  • Last Modified:

Using jQuery livequery to highlight a table row

I'm trying to highlight a row with jQuery and plugin livequery. I can do it fine if the table is loaded into the page initially, but if I try to dynamically load the table, the livequery is not working.

Is this possible? I've googled it but I don't see any examples doing what I need to do. Normally I would use the jQuery plugin flexigrid which handles it by binding the rows as they are appended but that is not what I want to do.

I want to be able to have a page loaded, click a link to display table data and onclick of the rows in that table, highlight the clicked row and remove the highlight from any previously clicked rows.

$('#tableid tbody tr ').livequery('click',function(e){
    ... take action here ...

Open in new window

1 Solution
I am not familiar with livequery but based on your goal I would just use the build in jquery live function. The live function was specifically created to handle objects created on a page after it has loaded.


$('.clickme').live('click', function() {
  // Live handler called.
WebspeederAuthor Commented:
I've been using livequery for a long while now, maybe it was replaced by live. .live worked though.

Thanks for the info.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now