Go to Top Button not working

From some reason my go to top button no longer working i do not know if some one touched in the jquerry code of my go to top button…
it all worked fine after setting it up on this thread https://theme.co/apex/forum/t/go-to-top-button/21398

but something messed up i have no idea what happend, please help.

Hi,

I’ve checked your website and I can see you added two identical JS code snippets to (X > Options > JS) and (Appearance > Customizer), this caused some JS conflicts on your website, I’ve removed that copy in Customizer and now the “go to top” button should be working fine. As a backup, this is the code I’ve removed from Customizer.

Thanks.

the code was nessesary why did you removed it? the go to top button is not working as i want, i dont want it to go to the slider top i want it to go to the menu top as i said , themeco staff gave me this code inorder to make the go to top button go to the menu top and not the slider top.
now from some reason the code themeco staff gave me in the thread i linked is out dated.

Hi there,

It’s identical copy (a duplicate codes), you can add it again by copying the one in global custom javascript.

I could re-add it again if you wish but your button will not work again.

Thanks!

hi, but again, as i said, i have a whole thread about making this code.


i dont want the button to take me to the top, i want it to take me to the top of the menu not top of the page. so how can this be done again? i have already done this with your staff but from some reason the code doesnt work anymore :frowning:

Hi,

Upon checking, I can see that your scroll to top anchor is no longer active.

Please activate it again under Appearance > Customize > Miscellaneous

Thanks

Hi, yes but that does not solve the problem, i have a goto top button but it takes me to the top of the page, i dont want that i want it to take me to the top of the menu.

Hi there,

The initial subject of this thread has been solved as it was about the scroll to top button not working because of your custom script.

As for the scroll to top button, that is its default behavior where the page scrolls to the top when you click it thus the name scroll to top. You will have to write some custom code to override the default setting that is native to the theme. This is something we cannot provide because this falls beyond the scope of our support.

Thank you.

What do you mean it is beyong the scope of your support?
your support gave me that code in the thread i linked
why are you telling me that something you did helped me with now you cant help me with.

You supported me in this thread https://theme.co/apex/forum/t/go-to-top-button/21398/2
how come now its outside of your support scope?
the code is became outdated because of the X theme update. so now its outside of your support scope?

Hi there,

I understand that you have emailed in directly. Matt will respond to your email within 24 hours.

Thank you.

Hello there,

The email has nothing to do with this thread, if you cant help me at least forward this thread to lely, she assisted me with this code on my last thread i have linked. she is probably the one who can know what went wrong with the code since X last update, thanks.

Hi there,

We are sorry about not communicating with you properly in the first place. That is a problem by our part and now I will try to explain the case in details.

Your request was a customization and our support staff went above and beyond to implement the feature for you, but they forgot to state that it is outside of our support policy which we already stated in our terms of service:

https://theme.co/apex/terms/

W should have mention that the customization we provide is a mean to be extra helpful and if the code breaks for any reason including the update of the theme we will not be able to follow up and the burden will be on your shoulders.

I am stating the same thing now for all and the future customization that you ask from us. If you ask for a feature which is not presented out of the box we will assess the case and if it is feasible we will give you the suggestions to implement the feature but the same rules that I already mentioned will apply.

Having said that, I will ask Lely to check the case and if it is possible give you a follow up. Please consider that there is no guarantee that we can accommodate the code suggested with the new version of the theme.

Thank you for your understanding.

1 Like

Hi There,

We’re sorry for the inconvenience this has cause you but yes, Christopher is correct. We tried are best to help but going forward, the responsibility to maintain the code is not part of the support. I tried to check though why it is not working anymore but then I cannot access login URL. .wp-login.php or wp-admin is not working or accessible.

1 Like

Hey cris, hey lely,
thank you for your reply! i understand the following, but i am asking for the help of you please, i am not sure it is because of the theme update, i think its because some ID or # has been changed,
adding secure note

Hi there,

I don’t think this is related to update. I implemented the same code and the error is because the jQuery is not defined. Probably a conflict with other codes, jQuery is Wordpress built-in library so it should be loading okay.

Since its live and in a different language, I prefer not to troubleshoot and further remove any custom code. The code doesn’t need fixing or any changes since it still uses the same selector (class). What you need is disable all plugins (except cornerstone) and test the same code on your site.

Thanks!

i have tried everything, i removed all plugins and still the code doesnt work

Hey There,

The Scroll to Top button is not working because there is a JS error on the page. Please have the JS code updated in the theme options custom JS section and use this:

jQuery(function($) {
    $('.scrol-top-advanced a').on('click', function(event) {
        event.preventDefault();
        setTimeout(function() {
            $('.scrol-top-advanced a').css('display', 'none');
        }, 1000);
    });
});

jQuery('.cp-default-close').on('click', function() {
    jQuery('video')[0].pause();
});

jQuery('.wp-side-menu a.wp-side-menu-item').attr('target', '_blank');

jQuery(function($) {
    $(document).on('click', '.cp-overlay-close', function() {
        $('.rev_slider video').each(function() {
            $(this).get(0).pause();
        });
    });
});

(function($){
  $(document).scroll(function() {
    var y = $(this).scrollTop();
    if (y > 665) {
      $('.wp-side-menu').fadeIn();
    } else {
      $('.wp-side-menu').fadeOut();
    }
  });
})(jQuery);






//=================================== SMOOTH SCROLLING EXTERNAL ANCHOR //      
(function($){
  $(document).on("ready", function () {
      var urlHash = window.location.href.split("#")[1];
      $('html,body').animate({
          scrollTop: $('.' + urlHash + ', #' + urlHash +',[name='+urlHash+']').first().offset().top -100
      }, 1000);
  });
 
})(jQuery);
 
 
// =================================== SMOOTH SCROLLING LOCAL ANCHOR //
(function($) {
        $('a[href*=#]:not([href=#])').click(function() {
            if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
              var target = $(this.hash);
              target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
              if (target.length) {
                $('html,body').animate({
                  scrollTop: target.offset().top -100
                }, 1000);
                return false;
              }
            }
        });
})(jQuery);

// =================================== SMOOTH SCROLLING LOCAL ANCHOR 

(function($){
  $(document).ready(function() { 
      var elem = $('#_' + window.location.hash.replace('#', ''));
      if(elem) {
           $.scrollTo(elem.left, elem.top);
      }
  });
})(jQuery);

Please let us know how it goes.

1 Like

Hey RueNel!

I have replaced the code, however it doesnt fixes the scroll top button but it did vanish the side menues on the open screen and shows them only after scrolling down which is actualy what i wanted as well, is there any option to vanish the chat popup and the accesibility and the online counter as well!?!?
Screenshot>> http://prntscr.com/j9a21n

update: the side menues are not shown in other pages it seems they only shown after scrolling down. can this be fixed?

Please feel free to enter website with credentials as admin and edit it (the codes) as you wish, i trust you.

Hi there,

You already added another thread regarding the go to top button and we followed up the case there. I will add the answer here again:

Hi there,

Unfortunately that is not possible with the custom code you have. You need to use our default Go to Top feature which you can enable from X > Theme Options > Miscellaneous > SCROLL TOP ANCHOR.

Our theme does not have an option to stop the go to top animation in a specific section of the page and it will go all the way to the top.

If you need such a feature you will need to hire a developer to do that for you.

Thank you for your understanding.

Thank you.

how could you tell me to hire a developer to do that for me ? i have paid 50$ for developers here to help me and that what you tell me?