Replace contents of div when submenu item clicked

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1420
    jlpaltenghe
    Participant

    I am new to web development. I have a page that uses the vertical menu with submenu items. Each submenu item represents a different report object. I want to display all reports within the same

    upon the user clicking the respective submenu item. How do I accomplish this?
    #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;
    });
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Register

You will be emailed a link to set your password.

Login

Lost password?