Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

The page scrolls to the top and the page when animation ends for swiper.js plugin

  • 2 balasan
  • 1 ada masalah ini
  • 78 paparan
  • Balasan terakhir oleh gscott523

more options

I have implemented multiple swiper carousels on one page. It seems that only in firefox, the page scrolls to the top and the page almost looks like its doing a post back (developer tools clear making it difficult to select the swiper.js so that I can set break points – Almost mirrors the behavior of a page postback but i know its not). The page is http://accqa.lazydays.com . Any help would be much appreciated. I'm not sure if this is a swiper issue or a firefox one, but if anyone could help, I would be obliged. When navigating to the example link, Scroll down. You'll see the once the banner finishes rotating the screen will instantly go to the top. I'm pretty sure this is not an issue with the plugin, but checking here just in case.

I have implemented multiple swiper carousels on one page. It seems that only in firefox, the page scrolls to the top and the page almost looks like its doing a post back (developer tools clear making it difficult to select the swiper.js so that I can set break points – Almost mirrors the behavior of a page postback but i know its not). The page is http://accqa.lazydays.com . Any help would be much appreciated. I'm not sure if this is a swiper issue or a firefox one, but if anyone could help, I would be obliged. When navigating to the example link, Scroll down. You'll see the once the banner finishes rotating the screen will instantly go to the top. I'm pretty sure this is not an issue with the plugin, but checking here just in case.

Penyelesaian terpilih

I notice a hash appear at the end of the URL:

http://accqa.lazydays.com/#

???

Oh, I think I found it: you are setting the hashnav parameter to true in your API call. But you aren't supplying the data-hash parameter, which may be causing the use of # alone in this function:

setHash: function () { if (!s.hashnav.initialized || !s.params.hashnav) return; document.location.hash = s.slides.eq(s.activeIndex).attr('data-hash') || ''; }

Or maybe the problem is somewhere else. There are a ton of source files.

See: http://idangero.us/swiper/api/#hash

Baca jawapan ini dalam konteks 👍 0

All Replies (2)

more options

Penyelesaian Terpilih

I notice a hash appear at the end of the URL:

http://accqa.lazydays.com/#

???

Oh, I think I found it: you are setting the hashnav parameter to true in your API call. But you aren't supplying the data-hash parameter, which may be causing the use of # alone in this function:

setHash: function () { if (!s.hashnav.initialized || !s.params.hashnav) return; document.location.hash = s.slides.eq(s.activeIndex).attr('data-hash') || ''; }

Or maybe the problem is somewhere else. There are a ton of source files.

See: http://idangero.us/swiper/api/#hash

more options

You Rock. Thanks so much!