jquery selectable and right click
javascript, jquery
Solution
Ended up writing my own select function and calling it on right click. Not sure what is up with that event.
Problem
I am using a jquery selectable as shown below. ``` //Selectable Functionality $(document).ready(function () { $("#Selectable_Positions").selectable({ selected: function (event, ui) { dostuff(); } }) }) ``` It is working correctly however only left click will cause the select event to fire. I am trying to make it so that right click will as well. I have tried adding the code below and the alert fires but the selected item does not change. ``` $(document).ready(function () { $('#Selectable_Positions').mousedown(function () { $('#Selectable_Positions').trigger('selectableselected'); alert('foo'); }) }) ``` How can I programatically change the selected item in the mousedown event function? edit Updated eventname as per Ian's suggestion below. I have created a jsfiddle showing what I am trying to achieve and the triggered event not firing on right click. Does anybody know how to make this work? It would be greatly appreciated http://jsfiddle.net/Jzjdm/