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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:14:30+00:00 2026-05-27T05:14:30+00:00

in my jQuery code, removeClass is not working. Whenever I click hide link the

  • 0

in my jQuery code, removeClass is not working. Whenever I click hide link the .close element is not getting removed in IE6.0 but it works in firefox and IE8.0, Below is my jQuery code:

$(document.ready(function()){
    toggleNodes = function(node,action){
        var $componentone = $('.componentone', node);

        if (action == undefined || action == 'hide'))) {
            $componentone.addClass('closed');
            $componentone.hide();
        }
        else if  (action=='undefined'||action=='view'){
            $componentone.removeClass('closed');
            $componentone.show();
        }
    }
});

`close’ is declared as below in .css file:

.componentone{
    margin-left:10px;
    padding-left:15px;
    border:1px solid #fff;
    border:0px solid #ddd;
}

.componentone.closed{
    margin-left:10px;
    padding-left:15px;
    border:1px solid #fff;
    border:0px solid #ddd; 
}

And in JSP I have used it like this:

<div="componentone">body of div</div>
<div="component">body of div new</div>
  • 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-27T05:14:31+00:00Added an answer on May 27, 2026 at 5:14 am

    your else condition has a syntax error

    else if { (action=='undefined'||action=='view')
    
            $info.removeClass('closed');
            $componentone.show();
           }
    
    to
    
    else if  (action=='undefined'||action=='view'){
    
            $info.removeClass('closed');
            $componentone.show();
           }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my jquery code not run with IE6 but runs all others including IE7. It
I got a useful jQuery code, unfortunately its working great in Firefox but not
Ok an have an accordion, but i am not using jQuery UI. This is
This is probably an easy solution but Im not getting it. So I have
Below is my current code. And it is working fine, but I need the
My jQuery code: $(document).ready(function() { chrome.extension.sendRequest({get: height}, function(response) { height = response.value; }); $(#id).css(height,
Say I have jquery code like this: html += '<div class=index>' + item.index +
i have the following jquery code. basically i will have several overlapped divs and
I have the following JQuery code that worked perfect in C#/Asp.net 2.0 to call
I have some jQuery code. I have called an Ajax function file, file.php, that

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.