Is there any particular reason you need JavaScript to do this, instead
of just using CSS?
#menu ul {
display:none;
}
body#foo ul.foo, body#bar ul.bar, body#foobar ul.foobar {
display:block;
}
On Apr 18, 10:05 am, Max wrote:
> Thanks so much for the reply.
> however i may have
Thanks so much for the reply.
however i may have worded my question poorly.
I need the if statement to replace $('#menu ul.test').show();
so that instead the with class test, only the ul with the class
matching the body is shown.
the rest are hidden.
thanks again
-Max
On Apr 18, 6:50 pm, Nic
function initMenu() {
if ($('body').attr('id') === $('#menu ul').attr('class')) {
$('#menu ul').hide();
$('#menu ul.test').show();
$('#menu li a').click(
function() {
$(this).next().togg
3 matches
Mail list logo