SitePoint Sponsor

User Tag List

Results 1 to 1 of 1

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Jan 2004
    Location
    Denmark
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Problems regarding a nivoslider?

    Im using a plugin called nivoslider which works fine exept for one thing.
    I need the slider to stop when i click on the slider because a window opens and play vimeo.

    I need to stop the slider animation because it makes the video halt.

    I have added the following code
    Code:
    	slider.mousedown(function(){ 
                    vars.paused = true;
                    clearInterval(timer);
                    timer = '';
    	});
    This added code works fine if it wasnt for

    Code:
            //For pauseOnHover setting
            if(settings.pauseOnHover){
                slider.hover(function(){
    				vars.paused = true;
                    clearInterval(timer);
                    timer = '';	
                }, function(){
                    vars.paused = false;
                    //Restart the timer
                    if(timer == '' && !settings.manualAdvance){
                        timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
                    }
                });
            }
    When i remove the slider.hover script the slider animation stops on click as i would for it to do.

    But when if not the slider dosnīt stop - i still would like for the animation to stop on hover/mouseover - but how do i kill the hover event when somebody clicks on the slider so the animation stopps????

    Edit:

    Nivo slider source code
    Last edited by paul_wilkins; May 19, 2011 at 00:56. Reason: plugin script removed


Tags for this Thread

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
  •