You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This fulfills the use case where the userview sidebar contains a lot of userview categories and menus.

By default, upon clicking on any userview menu, the sidebar will default to the top position. So if the current active userview menu is at the bottom region of the sidebar, it requires scrolling just to get to it.

To enhance the user experience, just edit the userview, navigating to Settings → Theme tab → Advanced tab, find the "Custom JavaScript" property and paste in the code snippet below:

$(function() {
    setTimeout(
      function() 
      {
        var yOffset = $("li.active").position().top;
        $("#sidebar").mCustomScrollbar("scrollTo", yOffset);
      }, 200);
});




  • No labels