Home Forums WoodMart support forum Custom Back to Top not working

Custom Back to Top not working

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #39908

    miguel1876
    Participant

    Hi guys

    I want to add a back to top button in a couple of places on a page. I used the follwoing code but it doesn’t work:

    <script type="text/javascript">
    jQuery(document).ready(function () {
        jQuery(window).scroll(function () {
            if (jQuery(this).scrollTop() > 800) {
                jQuery('.scrollup').fadeIn(1000);
            } else {
                jQuery('.scrollup').fadeOut(1000);
            }
        });
    
        jQuery('.scrollup').click(function () {
            jQuery("html, body").animate({
                scrollTop: 0
            }, 600);
            return false;
        });
    });
    </script>

    The codes does not work when using Woodmart. There is no smooth scroll top the top.
    Can you tell me if there’s a conflict somewhere with the Theme? I have used this code many times and it always works.

    Thanks

    #39937

    Artem Temos
    Keymaster

    Hello,

    Could you please provide us a link to the page with this code added where we can check what is wrong with it?

    Regards

    #40035

    miguel1876
    Participant

    Hi

    Here’s the Page URL:
    http://rarinutrition.com/product/infinity/
    (See private content for instructions on how to view the page)

    The scroll to top button appears here:
    https://imgur.com/a/USX3I

    Thank you

    #40045

    Artem Temos
    Keymaster

    Sorry, but we can’t access your website and always get this error in all browsers https://gyazo.com/b1660748fa64e8d0b0909817abf0b58a

    #40048

    miguel1876
    Participant

    Hi

    You have accessed it before as I sent a ticket last week. Make sure to change the hosts file with the info I provided.

    Try using this URL:
    http://o6dvp.hosts.cx/product/infinity

    #40057

    Artem Temos
    Keymaster

    Seems that this button is influenced by this code snippet as well and that is why it doesn’t work properly https://gyazo.com/4c158528bbdde2a653bd6ea20ea752d5

Viewing 6 posts - 1 through 6 (of 6 total)