is it possible to make a child element visible if the parent is hidden

Posted by amir on Stack Overflow See other posts from Stack Overflow or by amir
Published on 2011-02-17T14:56:44Z Indexed on 2011/02/17 15:25 UTC
Read the original article Hit count: 238

Filed under:
|

Hi

just wondering if its possible to have a hidden parent and a visible child with css or jQuery,

basically on some certain pages I'm trying to make a child element visible even though the parents are hidden,

var bodyClass = jQuery('body').attr('class');
    //alert (bodyClass);
    var searchTerm = 'category-mens';
    var searchTerm2 = 'category-ladies';
    if((bodyClass.search(searchTerm) || bodyClass.search(searchTerm2)) != -1) {
        jQuery('.nav-container ul.level0 li.level1 ul.level1 li.level2 ul.level2 li.first a span').css({
             'display':'block',
             'position':'absolute',
             'top':'500px',
             'left':'500px'
        }); 
    } 

at the moment it doesn't work because the li.level2 is hidden.

Thanks for the help.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about css