Results 1 to 4 of 4

Thread: Featured Content Glider pause on hover

  1. #1
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Default Featured Content Glider pause on hover

    1) Script Title: Featured Content Glider

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tentglider.htm

    3) Describe problem: Is there any way to make the auto rotate pause on mouse hover, then resume on mouse exit?
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

  2. #2
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Default

    Figured it out on my own.
    Just add the following before the end of the glide function:
    Code:
    	glide:function(config, showpage, isprev){
    		var selected=parseInt(showpage)
    		if (selected>=config.$contentdivs.length){ //if no content exists at this index position
    			alert("No content exists at page "+(selected+1)+"! Loading 1st page instead.")
    			selected=0
    		}
    		var $target=config.$contentdivs.eq(selected)
    		//Test for toggler not being initialized yet, or user clicks on the currently selected page):
    		if (config.$togglerdiv.attr('lastselected')==null || parseInt(config.$togglerdiv.attr('lastselected'))!=selected){
    			var $selectedlink=config.$toc.eq(selected)
    			config.nextslideindex=(selected<config.$contentdivs.length-1)? selected+1 : 0
    			config.prevslideindex=(selected==0)? config.$contentdivs.length-1 : selected-1
    			config.$next.attr('loadpage', config.nextslideindex+"pg") //store slide index to go to when "next" link is clicked on
    			config.$prev.attr('loadpage', config.prevslideindex+'pg')
    			var startpoint=(isprev=="previous")? -config.startpoint : config.startpoint
    			$target.css(config.leftortop, startpoint).css("zIndex", this.csszindex++) //hide content so it's just out of view before animating it
    			var endpoint=(config.leftortop=="left")? {left:0} : {top:0} //animate it into view
    			$target.animate(endpoint, config.speed)
    			config.$toc.removeClass('selected')
    			$selectedlink.addClass('selected')
    			config.$togglerdiv.attr('lastselected', selected+'pg')
    		}
    		$target.hover(function(){featuredcontentglider.cancelautorotate(config.togglerid)}, function(){featuredcontentglider.autorotate(config)})
    
    	},
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

  3. #3
    Join Date
    Mar 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default glitchy after adding pause

    I added the pause on hover line... it works.. but it gets glitchy sometimes...
    I am not sure why?...
    http://www.advantagelumber.com/index2.html

    You can see the problem I am having here

    PLEASE HELP

  4. #4
    Join Date
    Mar 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default hover on and off

    hover on and off rapidly... it really gets messed up!
    http://www.advantagelumber.com/index2.html

    Is there a fix for this?

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
  •