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;
});

Register

You will be emailed a link to set your password.

Login

Lost password?