Results 1 to 2 of 2

Thread: Smooth Navigational Menu - disable help?

  1. #1
    Join Date
    Sep 2011
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Smooth Navigational Menu - disable help?

    1) Script Title:

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...smoothmenu.htm

    3) Describe problem:
    Is this a way to disable the smooth menu temporarily? I am attempting a popup window when a particular menu item is chosen but need the smooth menu to stop reacting to mouse over events. Is this possible?

    Thanks in advance for any advice

    Frank J

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Try adding the below function to the HEAD section of your page:

    Code:
    <script>
    
    function togglemenu(menuid, action){
    	var $=jQuery
    	var $menu=$('#'+menuid)
    	if (action=='disable'){
    		$menu.find('ul:eq(0)').css({visibility:'hidden'})
    	}
    	else{
    		$menu.find('ul:eq(0)').css({visibility:'visible'})
    	}
    }
    
    </script>
    It lets you "hide" the inner contents of a smooth menu on demand, essentially disabling it on demand. For example, the following two links when clicked on enables/disables the Smooth Menu with ID "#smoothmenu1":

    Code:
    <a href="javascript:togglemenu('smoothmenu1', 'disable')">Disable</a> | <a href="javascript:togglemenu('smoothmenu1', 'enable')">Enable</a>
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    fjaccarino (09-14-2011)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •