• Resolved Marta Negro

    (@guiri-express)


    Hello.
    I manage to fix the problem of navigating between tabs and having to scroll down every time with the snippet that Champ gave me.

    But now, even when you enter for the first time in your profile, after login for example, you can’t see your profile picture (unless you scroll up) because the function is activated even if you don’t press in any tab, so just shows below the tabs.
    Is the function can be change and have it activated or create a trigger when you click on the tabs?

    Thank you very much.

    jQuery(document).ready(function() {
       var $container = jQuery("html,body"),
          $scrollTo = jQuery(".um-profile-nav");
    
       // Or you can animate the scrolling:
       $container.animate(
          {
             scrollTop: $scrollTo.offset().top - $container.offset().top + $container.scrollTop() - 500
          },
          1500
       );
    });
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @guiri-express

    You can try this code snippets below:

    jQuery(document).ready(function() {
       var $container = jQuery("html,body"),
          $scrollTo = jQuery(".um-profile-nav");
    
       if (um_061421_param("profiletab")) {
          // Or you can animate the scrolling:
          $container.animate(
             {
                scrollTop: $scrollTo.offset().top - $container.offset().top + $container.scrollTop() - 500
             },
             1500
          );
       }
    
       function um_061421_param(name) {
          return (location.search.split(name + "=")[1] || "").split("&")[0];
       }
    });

    The above code will scroll the page to the tab when the profiletab is present in the URL.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. ..Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘tabs UX’ is closed to new replies.