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 7093633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:27:49+00:00 2026-05-28T08:27:49+00:00

I have a div containing li’s and a div containing a table. When there

  • 0

I have a div containing li’s and a div containing a table. When there is a hover on a li I want the “system” to take the “refSortie” attribute and hide the table rows for which the “refDate” attribute equals the “refSortie” attribute. My code is not working. Hope someone can help. Thank you in advance for your replies. Cheers. Marc.

My HTML :

<div id="contentWrapper">
    <div id="contentOne" class="content">
        <ul>
            <li refSortie="mmm">MMMMM</li>
            <li refSortie="sss">SSSSS</li>
            <li refSortie="mmm">MMMMM</li>
            <li refSortie="ppp">PPPPP</li>
        </ul>
    </div>

    <div id="contentTwo" class="content">
        <table>
            <tr refDate="mmm"><td>MMMMM</td><td>hdqjkhs</td><td>hdqjkhs</td></tr>
            <tr refDate="mmm"><td>MMMMM</td><td>hdqjkhs</td><td>hdqjkhs</td></tr>
            <tr refDate="ppp"><td>PPPPP</td><td>hdqjkhs</td><td>hdqjkhs</td></tr>
            <tr refDate="sss"><td>SSSSS</td><td>hdqjkhs</td><td>hdqjkhs</td></tr>
        </table>
    </div>
    <div id="contentThree" class="content"></div>
    <div id="contentFour" class="content"></div>
</div>

My JS :

$('#contentOne li').hover(function(){
    var refSortie=$(this).attr('refSortie');

    if(!$('#contentOne').hasClass('freezed')){
        $('#contentTwo table tr[refDate=refSortie]').css("display":"none");}
}).mouseout(function(){
    if(!$('#contentOne').hasClass('freezed')){
        $('#contentTwo table tr[refDate=refSortie]').css("display":"inline");}    
});
  • 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-28T08:27:50+00:00Added an answer on May 28, 2026 at 8:27 am

    You have a multitude of things going on here. Fixed js code:
    http://jsfiddle.net/brentmn/cRJdz/

    $('#contentOne li').hover(function() {
        var refSortie = $(this).attr('refSortie');
    
        if (!$('#contentOne').hasClass('freezed')) {
            $('#contentTwo table tr[refDate!=' + refSortie + ']').css("display", "none");
        }
    }).mouseout(function() {
        var refSortie = $(this).attr('refSortie');
        if (!$('#contentOne').hasClass('freezed')) {
            $('#contentTwo table tr').css("display", "inline");
        }
    });
    

    The errors were:
    refDate=refSortie //needs to be variable
    css("display":"inline") // if you want to set css this way, you must use an obj e.g. css({"display": "inline"})

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

Sidebar

Related Questions

I have a div containing some content, in which there are some links. The
I have a div containing two images which is wrapped with a hover event.
I have an absolutely positioned div containing several children, one of which is a
I have a fixed width DIV containing a table with many columns, and need
I have a div, containing text and a few links. I want to trigger
I have a div containing several other divs with setting float:left. Now I want
I have an absolutely positioned div containing several children, one of which is a
I have made a hidden DIV containing a flash-movie, and a button which display
I have a div containing a span and I want the span to vertically
I have a div containing an event I want it to look like this

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.