Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

oldfashioned style: (sm-vertical-no-flyout) required

Home Forums Older releases 1.0.x oldfashioned style: (sm-vertical-no-flyout) required

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3092
    ratmalwer
    Participant

    Hello

    I come back with a question you kindly tried to help already in the post:href not working on parent as expected

    I tried to change the script you provided but failed, to make it suitable.
    I want to have a menu lets call it: (sm-vertical-no-flyout) witch works in a leftside div when there is no mobile-view.

    The menu should react as this examlple (click the CMS_ML -item of the link : http://mk-design.ch).
    – on click the menu should expand, the href should fire and the menu should remain expaded.
    – on cklick of the sub-menu the href should fire and the menu should remain expanded.

    Is there an easy way to do this?

    #3095
    admin
    Keymaster

    Hi,

    I am not sure why you would need to use the script for such a basic functionality (that could actually be achieved easily without any JS at all) but here is something that should work as intended:

    $(function() {
    	var $menu = $('#main-menu');
    	$menu.smartmenus({
    		subMenusSubOffsetX: 1,
    		subMenusSubOffsetY: -8,
    		markCurrentItem: true,
    		noMouseOver: true,
    		hideOnClick: false
    	});
    	
    	// show current sub menu on init
    	$menu.smartmenus('itemActivate', $menu.find('a.current').eq(-1));
    	
    	// prevent activating any items
    	$menu.bind('activate.smapi', function() { return false; });
    });

    Please let me know if you have any troubles.

    #3096
    ratmalwer
    Participant

    No all is static – no parent gets expanded…
    Can I send you an examlpe (word/pdf) to explain what I want?

    I wanted the script for easy realize different menus (horizontal/vertical and I liked the mobile-view.

    #3097
    admin
    Keymaster

    Sure, you can send it to smartmenus@smartmenus.org if you like or upload it somewhere and post the link here (as Protected data if you like to keep it between us).

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘1.0.x’ is closed to new topics and replies.