jQWidgets Forums

jQuery UI Widgets Forums Navigation Menu, Context Menu Center items menu

Tagged: 

This topic contains 1 reply, has 1 voice, and was last updated by  oakdemirci 12 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Center items menu #16267

    oakdemirci
    Member

    Maybe this is not directly related to jqxmenu, but I need some help.
    I’m using the Center Items Menu demo. I used ‘itemclick’ event and ‘data-url’ property to load a html5 page into an iframe. Works perfect.
    But I dont really want to use Iframe, because it’ll be an adaptive page, instead I just want to load html5 page in the same page without losing menu. It’ll not redirect the page. Also the loaded page contains jquery scripts, I don’t want to load just a static content as well…
    I’ve tried jquery load(), ajax() calls but couldnot manage yet.
    Really a nice library. Thanks for it and for the help…

    Center items menu #16299

    oakdemirci
    Member

    I found a solution. I’m sharing jquery code in case somebody uses…

    $(“#jqxMenu”).bind(‘itemclick’, function (event) {

    var url = $(event.target).attr(“data-url”);
    $(“#content”).load(url+” #chart_div”, function () {
    $.getScript(“./DashBoardJS.js”, function (data, textStatus, jqxhr) {
    console.log(data); //data returned
    console.log(textStatus); //success
    console.log(jqxhr.status); //200
    console.log(‘Load was performed.’);

    mainFunction(); // this is a function in DashBoardJS.js
    });
    });

    });

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.