Jquery, div with two classes hide one show the other - conflict?????

Posted by user349223 on Stack Overflow See other posts from Stack Overflow or by user349223
Published on 2010-05-24T19:05:19Z Indexed on 2010/05/24 19:11 UTC
Read the original article Hit count: 145

Filed under:
|
|
|

Sorry if this was answered in a previous thread, i couldn't find one.

I have 4 sections: Section1, Section2, Section3, Section4

There are classes for each section, so I am hiding and showing based on the section. The problem is some classes need to be showin in Section1 and Section2.

<div class="section1 section2">
blah blah
</div>

$('a.homeLink').click(function(){
  $('.section1').show();
  $('.section2, .section3, .section4').hide();
  return false;
});

As you see in this case I have a div in two sections, but as i thought would happen it remains hidden due to hiding class section2

work arounds or solutions??

thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about classes