Reply To: Automatically close sub menus when opening other sub menus

Home Forums Older releases 1.0.x Automatically close sub menus when opening other sub menus Reply To: Automatically close sub menus when opening other sub menus

#2780
admin
Keymaster

OK, here is the demo:

http://jsfiddle.net/9xtnk2zc/1/

You will need the jQuery scrollTo plugin for the scrolling and then just use a custom collapsibleShowFunction when you initialise the SmartMenus plugin:

	// custom function to auto scroll to activated parent item in collapsible mode
	collapsibleShowFunction: function($ul, complete) {
		$ul.slideDown(200, function() {
			complete();
			// auto scroll to parent item
			$(window).scrollTo($ul.dataSM('parent-a'), 500);
		});
	}

Cheers!

Register

You will be emailed a link to set your password.

Login

Lost password?