This topic contains 1 reply, has 2 voices, and was last updated by Dimitar 9 years, 4 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Navigation › Menu, Context Menu › Open direction of Menu
Tagged: Menu, open direction
This topic contains 1 reply, has 2 voices, and was last updated by Dimitar 9 years, 4 months ago.
I have the create the following menu which opens great except (i used the right-click exmaple) that it opens to the right I want it to open to the left. I have tried modifying “$(“#jqxMenu”).jqxMenu(‘setItemOpenDirection’, ‘jqxMenu’, ‘left’, ‘down’);” with no luck. Anyone have any ideas?
Here is the code…
<div data-role=”page” data-theme=”b”>
<div data-role=”header” data-theme=”b”>
Portal
<h1>Current Requests</h1>
Menu
</div>
<div data-role=”content” data-theme=”b”>
<div id=’jqxWidget’>
<div id=’jqxMenu’ >
<ul id=’ulHeadMenu’>
<li id=’liAddRequest’>Add Request
<li id=’liViewRequests’>View Current Requests
<li id=’liViewVehicleRequests’>View Vehicle Requests
</div>
</div>
</div>
</div>
<script type=”text/javascript”>
$(“#jqxMenu”).jqxMenu({
width: ‘200px’,
height: ‘140px’,
autoOpenPopup: false,
mode: ‘popup’
});
$(“#jqxMenu”).jqxMenu(‘setItemOpenDirection’, ‘jqxMenu’, ‘left’, ‘down’);
$(“#btnHeadMenu”).bind(‘mousedown’, function (event) {
var scrollTop = $(window).scrollTop();
var scrollLeft = $(window).scrollLeft();
$(“#jqxMenu”).jqxMenu(‘open’, parseInt(event.clientX) + 5 + scrollLeft, parseInt(event.clientY) + 5 + scrollTop);
return false;
});
</script>
Duplicate Post: http://www.jqwidgets.com/community/topic/open-menu-in-code/
You must be logged in to reply to this topic.