jQuery UI Widgets Forums TreeGrid tree item clicking

This topic contains 2 replies, has 2 voices, and was last updated by  NormB 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • tree item clicking #121578

    NormB
    Participant

    Hi,

    I want to trigger an itemClick event on a tree item, but I need to distinguish between Left and Right Clicks.
    I discovered that $(‘#myTree’).on(‘itemClick’, MyFuncion) only fires on a left mouse click, not on a right click.

    So I tried $(‘#myTree’).on(‘mouseup’, ‘li’, MyFuncion) and also $(document).on(‘mouseup’, ‘#myTree li’, MyFunctiom)

    Both the above work, but for some reason are getting triggered twice for every mouseup event and I cannot figure out why.

    Is this likely to be anything to do with the widget itself setting another event handler – or I just need to be looking elsewhere? Any suggestions would be helpful.

    Thanks

    tree item clicking #121579

    Martin
    Participant

    Hello NormB,

    Please, check this Demo if it is what you are looking for. It is using the mousedown event.

    Best Regards,
    Martin Yotov

    jQWidgets team
    https://www.jqwidgets.com

    tree item clicking #121580

    NormB
    Participant

    That is just what I have based my code on – I’ll take a closer look at the detail.

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

You must be logged in to reply to this topic.