Ask questions and get good answers on jQuery

I am aware I can disable menu elements/children, but is there a way to dynamically disable & enable the parent/root menu?

An example

<div class="rootVoices" style="float:right">
    <div class="rootVoice {menu: 'menu_vote', disabled:true}">Vote</div>
</div>

I would like this menu to be disabled on page load, then once I have done user login (via ajax) this menu can then be enabled.

Sticking the 'disabled:true' part in the parent menu does not seem to work like it does for menu children.

Is it possible to do this, or should I just stick to changing the display css property to/from 'none' to make it hidden?

asked Dec 28 '09 at 00:27

Leeming's gravatar image

Leeming
11


The root voices have no enable/disable controls; I'll get this as an issue for next release.

answered Dec 30 '09 at 20:20

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Your answer
toggle preview

jQuery main site - Matteo Bicocchi