ejMenu - open it inside the viewport
$ejMenu.show(newPosition.left, newPosition.top, $(e.element));
We have analyzed your query and we can achieve your requirement using our existing property “enableRTL”.This API is used to float the menu in Right to Left Direction
Please refer the below code snippet
jQuery(function ($) { $("#vertical").ejMenu({ menuType: ej.MenuType.NormalMenu, orientation: ej.Orientation.Vertical }); $("#vertical").ejMenu('hide'); }); $("a[rel='nofollow' href]").click(function () { $("#vertical").ejMenu('show'); if (screen.width < $(".e-menu-wrap").width() + $("a[rel='nofollow' href]").position().left) { s = $("#vertical").data('ejMenu'); s.option("enableRTL", true); $(".e-menu-wrap").css({ position: "absolute", top: $("a[rel='nofollow' href]").position().top + 20, left: $("a[rel='nofollow' href]").position().left - $("a[rel='nofollow' href]").width() }); } |
In this we have applied enableRTL property if menu width crosses the screen width. So menu will open in right to left direction.
For your convenience we have prepared the simple sample based on this. Please get the sample from below location
Sample
Please check with the given sample. If we misunderstood your query, can you please provide more details to reproduce the reported issue in our end. if possible can you please reproduce the issue in given sample and revert us the modified sample that will be helpful for us to provide the prompt solution.
Regards,
Sasikala Nagarajan
Thanks for the update,please let us know if you have further quieries.We will be happy to help you out.
Regards,
Sasikala Nagarjan
- 3 Replies
- 2 Participants
-
ID Irvin Dominin
- Jun 18, 2015 09:49 AM UTC
- Jun 25, 2015 12:17 PM UTC