O
O
Oslar2018-06-25 08:13:21
iPhone
Oslar, 2018-06-25 08:13:21

The smooth scrolling of anchors on the iPhone is buggy, what's the problem?

On the mobile version of this site, scrolling through the anchors of the main menu is buggy on an iPhone, it works the second time, and even then not always! What could be the problem and how to solve it.

Maybe you need to disable it somehow. smooth scrolling on an iPhone, or something. I do not know what to do

$('.up_back, .butt_scroll_condPrice, .header__menu a, .header__logo a').on('click',
      function(){
        var scroll_el = $(this).attr('href');
          if ($(scroll_el).length != 0) {
            $('html, body').animate({ scrollTop: $(scroll_el).offset().top - 93}, 500);
          }
          return false;
      }
    );

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Sokolov, 2018-06-25
@Oslar

Try changing yours to

function(e){
e.preventDefault();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question