Grow your CSS skills. Land your dream job.

Anything slider help, change functionality to hover

  • # December 1, 2009 at 10:16 am

    Hello,

    I am using the AnythingSlider on a couple of sites and I think it’s great. However I have been asked if it is possible for the thumbnav links to activate the animation (slide) on hover instead of on click. I’m new to jquery and all things js so apologies if this is a ridiculous question,

    Thanks,

    Ze21

    # December 3, 2009 at 10:58 am

    Howdy,

    Basically change the click to a hover:

    Code:
    $(“#slide-jump”).hover(function(){
    $(‘.anythingSlider’).anythingSlider(6);
    });
    # December 15, 2009 at 7:25 am

    Thanks for your reply JaredAM. However I’m still not sure where I need to put that code? I can’t find any reference to ‘slide-jump’ in any of the anythingslider code.

    Sorry for being a bit slow,

    Ze21

    # December 17, 2009 at 7:15 am

    On line 173 of jquery.anythingslider.js you will see this:

    Code:
    $a.click(function(e){
    base.gotoPage(index);

    Change it to:

    Code:
    $a.hover(function(e){
    base.gotoPage(index);
    # December 17, 2009 at 7:55 am

    Oh, I’m sorry, are you not using Chris’ demo? http://css-tricks.com/examples/AnythingSlider/

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".