Results 1 to 3 of 3

Thread: weird scroll behaivour on chrome/ie

  1. #1
    Join Date
    Jan 2008
    Posts
    73
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default weird scroll behaivour on chrome/ie

    hello,
    i have a weird problem with jquery tools - scrollable - http://flowplayer.org/tools/scrollable/index.html

    the scrolling works perfect on FF but on chrome or ie the first run acts weird without the animation.and only on the second time it works as it should.

    take a look:
    http://joovoo.net/yahav3/gallery.php

    any suggestions on how to solve this?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I think it's partly because of the direction rtl of the page. Anyways, I found that if I reversed some things it worked out. In the order in which they appear in the page's source code, first change the .items div selector's float to left:

    Code:
    <style type="text/css">
    .scrollable {
        
    	position:relative;
    	overflow:hidden;
    	width: 904px;
    	height:260px;
        margin-top:112px;
        margin-bottom:25px;
    }
    .scrollable .items {
       	width:20000em;
    	position:absolute;
    }
    .items div {
    	float:left;
    	width:904px;
    }
    .scrollable img {
    	float:right;
    	padding:0px;
    	border:1px solid #000;
    	width:126px;
    	height:126px;
    }
    </style>
    Next, reverse the order of the .items child divisions (last is now first, first is now last - I'm only assuming this will work with more than two, should though):

    Code:
    <div class="scrollable">   
    <div class="items">
    <div>
    <a href="#"><img src="gal_images/p15.jpg"/></a>
    </div>
    <div>
    <a href="#"><img src="gal_images/p01.jpg"/></a>
    <a href="#"><img src="gal_images/p02.jpg"/></a>
    <a href="#"><img src="gal_images/p03.jpg"/></a>
    <a href="#"><img src="gal_images/p04.jpg"/></a>
    <a href="#"><img src="gal_images/p05.jpg"/></a>
    <a href="#"><img src="gal_images/p06.jpg"/></a>
    <a href="#"><img src="gal_images/p07.jpg"/></a>
    <a href="#"><img src="gal_images/p08.jpg"/></a>
    <a href="#"><img src="gal_images/p09.jpg"/></a>
    <a href="#"><img src="gal_images/p10.jpg"/></a>
    <a href="#"><img src="gal_images/p11.jpg"/></a>
    <a href="#"><img src="gal_images/p12.jpg"/></a>
    <a href="#"><img src="gal_images/p13.jpg"/></a>
    <a href="#"><img src="gal_images/p14.jpg"/></a>
    </div>
    </div>
    </div>
    Next reverse the the navigation links (the prev link becomes the next link and visa versa, and then their order on the page is reversed):

    Code:
    <a class="prev browse left">next</a>
    <a class="next browse right">prev</a>
    Finally, after initializing the scroller, shift it immediately to its end which is now really the beginning -

    Replace the redundant*:

    Code:
    <script>
     $(document).ready(function(){
    $(function() {
    	$(".scrollable").scrollable();
    
    })});
    </script>
    with:

    Code:
    <script>
    $(function(){
    	$(".scrollable").scrollable();
    	$(".scrollable").data('scrollable').end(0);
    });
    </script>

    *I say redundant because:

    $(document).ready(function(){

    and:

    $(function(){

    mean the same thing. The latter is shorthand for the former.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2008
    Posts
    73
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    jscheuer1, Thank you ver very very much.
    changing the order of the divs and scrolling the scroller to the end after the page loads solved it.
    (if u r intersted you can see the changes at the same link.)

    thank you very much again.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •