CSS-Tricks / AnythingSlider

A jQuery Slider plugin for anything.
http://css-tricks.github.io/AnythingSlider/
GNU Lesser General Public License v3.0
1.15k stars 380 forks source link

Page scrolls down to slider upon slide change #554

Closed pkmatte closed 9 years ago

pkmatte commented 11 years ago

Hello, we are running an older version of anythingslider that seems to have an issue with IE10 (may be others as well). When a slide is changed, upon finishing the animation the page scrolls down to position the slide at the top of the page (as if someone clicked on an anchor tag with a hash set as the value). You can see the issue here: http://fatalvision.com/ and click on any of the slides (or wait for it to automatically change).

We tried grabbing the latest version of anythingslider, but unfortunately, that doesn't work with the version of jQuery we are running. We don't have the budget to upgrade jQuery and make sure the entire site still works, so my question is if anyone knows a potential hotfix for this issue? I tried digging around in the code a bit, but couldn't find anything that might be causing it.

Thank you!

Mottie commented 11 years ago

I don't remember what causes the page to scroll down, but it isn't very difficult to make the newest version work with that older version of jQuery. Basically, change the css file and modify the HTML to this format (demo):

<ul id="slider">
    <li><img src="http://placekitten.com/300/200" alt="" /></li>
    <li><img src="http://placehold.it/300x200" alt="" /></li>
    <li><img src="http://placebear.com/300/200" alt="" /></li>
    <li><img src="http://lorempixel.com/300/200" alt="" /></li>
    <li><img src="http://placedog.com/300/200" alt="" /></li>
</ul>