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.

Re: Replace contents of div when submenu item clicked

Home Forums Older releases 0.9.x Replace contents of div when submenu item clicked Re: Replace contents of div when submenu item clicked

#1777
admin
Keymaster

You will need to call a JS function that will update your DIV on item click. Here is some sample code (of course, it can be done in many other ways):

HTML

<li><a href="#" data-page="home">Home</a></li>

JS

$('#main-menu').bind('select.smapi', function(e, item) {
	var page = $(item).data('page');
	// code to fetch the new page and update the DIV content
	// loadPage(page);
	return false;
});