SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smoother scrolling div on hover

    I'm having a great deal of trouble figuring out how to make this div continuously scroll smoothly while hovered over the arrows. It's almost like there is easing on the animation but I don't have any easing set for this instance of the animation. I'm really at a loss as to how to make this smoother. Any suggestions??

    Carousel Demo

    JS Found here: http://dev.infomedia.net/carousel/bcarousel.js

    What is the trick to get this to work?

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by solepixel View Post
    It's almost like there is easing on the animation but I don't have any easing set for this instance of the animation.
    The script that you linked to has easing set up as a default:

    Code javascript:
    options : {
        wrapper : 'bCarousel-wrapper',
        target : 'carousel-target',
        event : 'hover', // or click
        increment: 100,
        speed : 600,
        easing : 'easeOutQuad' // requires jquery easing plugin
    },

    You can override such defaults when setting up your own one.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The hover animation does not use that option. (line 150) And it also sets it to '' when the event is "hover" (line 30). I also have gone as far as commenting out EVERY reference to easing in this script:
    Line 19, 154, 161

    I also commented out the reference to the jquery.easing plugin completely, but it still seems to be easing.

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I fixed this by decreasing the increment to like 8 and changed the speed to 6


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
  •