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.

Top level touch on small devices

Home Forums Older releases 0.9.x Top level touch on small devices

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1381
    Leon
    Participant

    Hi there!

    I thought it could be a common problem, but haven’t found anything on it in this board.

    Touching a top level item on small devices makes a submenu slide down. At the next touch it will slide up. Now what I need instead is to follow the link of the top level item. Touching the arrow (or a plus) should trigger the unfolding of the submenu like this:

    Any idea?

    Best regards
    Leon

    #1783
    admin
    Keymaster

    Please take a look at the following topic. There is some sample code how to achieve what you would like:

    http://www.smartmenus.org/forums/topic/toggle-and-a-link

    Please let me know if you still have any questions after that.

    #1796
    Kinan
    Participant

    Hi,
    I’ve tried to use the sample code with the zero config bootstrap addon, but it seems like I’m not able to get it working.
    Any suggestions?

    by now I’ve tried to add the main-menu id to the unordered list:

    <div class="collapse navbar-collapse" id="navbar-collapse-1">
    <div class="navbar-left">
    <ul id="main-menu" class="dropdown-menu"></ul>
    </div>
    </div>

    and I’m using

    $(document).ready(function(){
    });

    to start the sample script

    #1802
    admin
    Keymaster

    Hi and sorry for the late reply! Just had too much urgent work recently and plus the holidays.

    I didn’t realize you were using the Bootstrap add-on. So, what you’ve done should work like normally (i.e. adding the id to the UL and calling the code onDomReady). Just in addition, you will need to comment out/delete the following code from “jquery.smartmenus.bootstrap.js” (or the min version if you use it):

    ,
    // click the parent item to toggle the sub menus (and reset deeper levels and other branches on click)
    'click.smapi': function(e, item) {
    	var obj = $(this).data('smartmenus');
    	if (obj.isCollapsible()) {
    		var $item = $(item),
    			$sub = $item.parent().dataSM('sub');
    		if ($sub && $sub.dataSM('shown-before') && $sub.is(':visible')) {
    			obj.itemActivate($item);
    			obj.menuHide($sub);
    			return false;
    		}
    	}
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘0.9.x’ is closed to new topics and replies.