jQWidgets Forums

jQuery UI Widgets Forums Navigation Menu, Context Menu Menu click event in Firefox

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  vmanne 12 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Menu click event in Firefox #15715

    vmanne
    Participant

    Hi,

    I have the following menu defined and the click event is not firing in Firefox. It is working in other browsers.

    $(‘#jqxWidgetMenuMain’).jqxMenu({ width:70, theme:theme, showTopLevelArrows: true, rtl: false, source: records });

    $(‘#jqxWidgetMenuMain’).on(‘itemclick’, function (event) {
    // get the clicked LI element.
    var element = event.args;
    alert(element.innerText);
    switch (element.innerText) {
    case “Home”:
    document.location.hash = “#layout”;
    break;
    case “Administration”:
    document.location.hash = “#layout=a”;
    break;
    default:

    }

    Please advise.

    Menu click event in Firefox #15720

    Peter Stoev
    Keymaster

    Hi vmanne,

    Here’s a working sample which works with FF on my side: menubindingtojson.htm.

    Could you verify that the above sample works on your side? If it does not, please tell us which version of FF do you use.

    Could you post your sample’s code? I am asking about the code, because I do not find anything strange from the code in your post.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Menu click event in Firefox #15727

    vmanne
    Participant

    Thanks Peter for the quick reply!

    It appears when using native DOM objects FF does not support innerText element. I had to use innerContent and it worked.

    However, that is not the case as in your example: when using jQuery $(event.args).text() and it is optimized to work with FF and IE.

    Another related question:

    Is there a way to provide “navigateUrl” option in the li element, such that when a li element is clicked they are taken to that url instead of catching the on itemclick method?

    Thanks again for your quick response!!

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

You must be logged in to reply to this topic.