» Forums
» NavBar
» Bug reports
» no-disable function
no-disable function
2005/02/14 13:50
Viewed 12969 times
Replies: 1/1

Hi,
you included the feature not to disable the current menu item.
I tried to set it with: menu.prefs["no-disable"] = true; bit its not working :(
Am i too stupid to use it? (tried it before AND after the menu.generate(); command)
Or is it a bug? :)
Greetings
Mario

Re: no-disable function
2005/02/14 14:04
Viewed 16971 times
Replies: 0/0

I'm very sorry, it seems you're right--there is a bug there. However, until we fix it, here's an easy workaround. Use menu.prefs["no-disable"] = "item-disabled", right after the call to new NavBar(...). What I had in mind was to allow one to keep the item enabled and add a special CSS class to it so that it can look different. "item-disabled" is the default class name for disabled items, and it will keep the item enabled yet make it look different ("selected" so to say). You can pass any string there and customize items having that class from the CSS file.

It's true though that this should work when you pass a boolean too--we'll fix this in the next release.

last
Google