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

  • Home
  • SEARCH
  • 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 920313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:41:34+00:00 2026-05-15T18:41:34+00:00

This change from mootools drives me crazy. HTML <tr class=teamicon> <td style=text-align: center; width=100%

  • 0

This change from mootools drives me crazy.

HTML

<tr class="teamicon">
    <td style="text-align: center;" width="100%" valign="middle">
    //Blahblah
    </td>
  </tr>
  <tr class="teamval">
    <td valign="middle" width="100%">
    //Blahblah
    </td>
  </tr> 

What I want to achieve. When with class “teamicon” is clicked I want to show/hide tr with class teamval with animation. However, I can’t make it animate properly. Looks like inside “teamval” must be animated first (or am I wrong?).

My try:

jQuery(document).ready(function(){
$('.teamval').slideUp(400);
$('.teamicon').click(function(){
    if ($(this).next('tr').is(":hidden"))
    {   
        $(this).next('tr.teamval').$('td').slideDown(400, function(){
            $(this).next('tr.teamval').slideDown(400);
        });
    }
    else
    {
        $(this).next('tr.teamval').$('td').slideUp(400, function(){
            $(this).next('tr.teamval').slideUp(400);
        });
    }
});
});

OFC. This is wrong ("$(this).next('tr.teamval').$('td')" returns error in firebug). How can I achieve this?

I can’t swap to div though.

  • 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-15T18:41:34+00:00Added an answer on May 15, 2026 at 6:41 pm

    You could do one of:

    $(this).next('tr.teamval').slideDown(...) // whole tr
    
    $(this).next('tr.teamval').find('td').slideDown(...) // td descendant
    

    The error is because you are trying to access a $ property on the jQuery element set, which doesn’t exist. Instead we can use find, which searches for matching descendants of elements in the current set.

    EDIT:

    Okay, I think you want:

    if ($(this).next('tr').is(":hidden"))
    {   
        var nextTeamval = $(this).next('tr.teamval');
        nextTeamval.find('td').slideDown(400, function(){
            nextTeamval.slideDown(400);
        });
    }
    

    The only potential problem is if teamval contains a td within a td (nested table). You can try this jsFiddle demo.

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

Sidebar

Related Questions

I'm updating mootools from 1.3.2 to 1.4.1. I saw a strange change. From this
I want to change this code from MVC2 <%@ Control Language=C# Inherits=System.Web.Mvc.ViewUserControl<System.DateTime?> %> <%=Html.TextBox(,
How do I change this code minDate: '2012/3/4'+'5D', var dates = $( #from, #to
I need to change table name from lowercase to uppercase but using this statement
from this code will show in original color how can i change it to
I'm trying to change the layout of a databound treeview from this: To this:
I want to change from this address: www.domain.com/game.php?id=1 to somthing like that: www.domain.com/game/1/THE-NAME-OF-THE-GAME-IN-DB How
I recently made the change from Dreamweaver to NetBeans and noticed this IDE doesn't
ANSWER : The fix for this problem is this : Change selector from $('#Button3')
I'm using mootools 1.4.3 for basic class inheritance. I'm actually converting some code from

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.