Mysteriis
Mysteriis

Reputation: 39

Jquery problem with IE

I use this piece of code to animate horizontal scroll, but don't work in IE!!!

<script type="text/javascript">
$(document).ready(function() {

    $('#next').click(function() {
        $('body').stop().animate({scrollLeft:"+="+500},1000); 
        $('#prev a').show();
    });

    $('#prev').click(function() {
        $('body').stop().animate({scrollLeft:"-="+500},1000 );
    });
});
</script>

Upvotes: 1

Views: 624

Answers (1)

karim79
karim79

Reputation: 342635

Off the top of my head, try using this selector instead:

$('html, body').stop().animate({...

Upvotes: 1

Related Questions