This topic contains 1 reply, has 2 voices, and was last updated by Sean Sean 3 years, 10 months ago.

Metronic.scrollTo() with fixed headers in Admin 3 layout

  • irandamay

    Member Reply #695

    The Metronic.scrollTo() function does not seem to be working quite right with the Admin 3 layout since it has multiple fixed header options.

    The Admin 3 options are to either have .page-header-top-fixed (in which case it should offset by .page-header-top’s height, not .page-header) or .page-header-menu-fixed (in which case it should offset by .page-header-menu’s height).

    I fixed it locally with the following (assets/global/scripts/metronic.js, line 594):

    if (el) {
      if ($('body').hasClass('page-header-fixed')) {
        pos = pos - $('.page-header').height();
      } else if ($('body').hasClass('page-header-top-fixed')) {
        pos = pos - $('.page-header-top').height();
      } else if ($('body').hasClass('page-header-menu-fixed')) {
        pos = pos - $('.page-header-menu').height();
      pos = pos + (offeset ? offeset : -1 * el.height());

    Posts: 4527
    Support Staff Reply #698

    Hi :),

    Thanks for informing this issue and sharing your solution. We will check it further ans fix it in the next update very soon. Again, really appreciate your contribution!


You must be logged in to reply to this topic.