I have a function

function closeSubModules(subModules){
        for(var i=0; i < subModules.length; i++){
                theElement = subModules[i];     
                $(theElement).hide();
        }       
}

one of the subModules[i] I've passed this function in an array is
"#faq li ul" and hides all the sub-modules
e.g.

<div id="faq">
    <ul>
        <li>
            <ul> <!-- hide this -->
               ....
            </ul>
        </li>
    </ul>

I've another function that toggles the hidden submodules onclick of
another element on the page.

If the submodule has a list inside it (e.g. as bullet points within
some text) these get hidden by closeSubModules() but don't get shown
by the toggle function (that only targets the "#faq li ul" level and
no deeper).

I've added this to my toggle function,

$(theItems).children("ul").show();

but that is a bit of a hack and only goes one level deep, and won't
show nested lists within any text in the module.

Any thoughts?

Thanks,

Dan.

-- 
Daniel Eastwell

Portfolio and articles:
http://www.thoughtballoon.co.uk

Blog:
http://www.thoughtballoon.co.uk/blog

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to