Example for disabling menu item

Example for disabling menu item

Hi,

I'd like to see a code example that demonstrates how to disable/enables a menu item when a certain event is fired. Will this functionality only be available with version 1.9 or would that work with the latest 1.8 version (autocomplete) also?
 
Thanks,

Ben