Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6589891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:13:54+00:00 2026-05-25T17:13:54+00:00

I have something like this: function SetTableBehavior() { $(.displayData tr).hover(function(e) { $(this).children().addClass(‘displayDataMouseOver’); }, function

  • 0

I have something like this:

function SetTableBehavior() {
    $(".displayData tr").hover(function(e) {
        $(this).children().addClass('displayDataMouseOver');
    }, function () {
        $(this).children().removeClass('displayDataMouseOver');
    });
    $(".displayData tr td").click(function(e) {
        var rowsSel = $(".displayData .displayDataRowSelected");
        for (var i = 0; i < rowsSel.length; i++) {
            var rowSel = rowsSel[i];
            $(rowSel).children().removeClass("displayDataRowSelected");
        }
        $(this).parent().addClass('displayDataRowSelected');
        var p = $(this).parent();
        p.children().addClass('displayDataRowSelected');
    });
}

When the body of the table is injected neither hover or click work.
If i use

$(".displayData tr td").live('click',function(e) {

the click event works but

$(".displayData tr").live('hover',function(e) {

doesn’t work

What is the solution so that hover works.
Thanks.

It seems to work like this:

function SetTableBehavior() {
    $(".displayData tr").live('mouseenter', function (e) {
        $(this).children().addClass('displayDataMouseOver');
    }).live('mouseleave', function(e) {
        $(this).children().removeClass('displayDataMouseOver');
    });
    $(".displayData tr td").live('click',function(e) {
        var rowsSel = $(".displayData .displayDataRowSelected");
        for (var i = 0; i < rowsSel.length; i++) {
            var rowSel = rowsSel[i];
            $(rowSel).children().removeClass("displayDataRowSelected");
        }
        $(this).parent().addClass('displayDataRowSelected');
        var p = $(this).parent();
        p.children().addClass('displayDataRowSelected');
    });
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:13:55+00:00Added an answer on May 25, 2026 at 5:13 pm
    $(".hoverme").live("mouseover mouseout", function(event) {
      if ( event.type == "mouseover" ) {
        // do something on mouseover
      } else {
        // do something on mouseout
      }
    });
    

    From here: http://api.jquery.com/live/

    There is no event called “hover” so you can’t use it with live or bind. It is just a “short-cut” that jQuery implemented for us.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have something like this... $().ready(function () { $(.post .comment_this).click(function () { var comment_id
i have something like this: $(#btn).click(function (event) { $.getJSON(url, function (data) { // i
As some example code, I might have something like this: $('a.parent').click(function(){ $('a.parent').each(function(){ $(this).stop(true,false).animate({ width:
I have something like this: $('element.selector').live(click, function (){ run_some_func (); }); $('element.selector2').live(click, function (){
So I have something like this: var xmlStatement:String = xmlObject.node[3].@thisValue; What mystery function do
So I have a function that looks something like this: float function(){ float x
I have a function that looks something like this: //iteration over scales foreach ($surveyScales
I have a script that looks like this #!/bin/bash function something() { echo hello
This is a C# console application. I have a function that does something like
I have something like this: function cat_filter() { $.ajax({ type: POST, url: 'json/cat_filter.aspx', data:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.