- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code below helps me to toggle sidebar.
$(document).on("click", "#opensidebar_btn", function(evt) { uib_sb.toggle_sidebar($("#sidebar")); });
and the code below prevents sidebar from closing when the click is inside the sidebar.
$(document).on("click", "#pageareas", function(evt) { $("#sidebar").click(function(evt){ evt.stopPropagation(); }); uib_sb.close_sidebar($("#sidebar")); });
I have some buttons on page and I can´t disable their click events while sidebar is open. I want to close the sidebar before any click event on that buttons, even if I click over them. I don´t want to create an overlay div to do that. Is there a method for that?
I tried some conditions like if .is('visible'), .is('visible').length > 0, .attr("aria-expanded"), .isShown but nothing has worked because sidebar seems to be always open, even if it is closed.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend that you create your own variable to declare a state for the side bar and invert it when it is closed or open. This would allow you to keep track of it yourself.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page