Results 1 to 2 of 2

Thread: Feature Content Slider onmouseout auto rotate

  1. #1
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    460
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default Feature Content Slider onmouseout auto rotate

    1) Script Title: Feature Content Slider

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

    3) Describe problem:
    autorotate stop working after mouseover on thumbnail/page, how to add onmouseout, the autorotate start again.
    Thanks
    _____________________

    David Demetrius // davejob
    _____________________

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,814
    Thanks
    2
    Thanked 424 Times in 418 Posts

    Default

    Code:
    buildpaginate:function(setting){
    	this.buildcontentdivs(setting)
    	var sliderdiv=document.getElementById(setting.id)
    	var pdiv=document.getElementById("paginate-"+setting.id)
    	var phtml=""
    	var toc=setting.toc
    	var nextprev=setting.nextprev
    	if (typeof toc=="string" && toc!="markup" || typeof toc=="object"){
    		for (var i=1; i<=setting.contentdivs.length; i++){
    			phtml+='<a href="#'+i+'" class="toc">'+(typeof toc=="string"? toc.replace(/#increment/, i) : toc[i-1])+'</a> '
    		}
    		phtml=(nextprev[0]!=''? '<a href="#prev" class="prev">'+nextprev[0]+'</a> ' : '') + phtml + (nextprev[1]!=''? '<a href="#next" class="next">'+nextprev[1]+'</a>' : '')
    		pdiv.innerHTML=phtml
    	}
    	var pdivlinks=pdiv.getElementsByTagName("a")
    	var toclinkscount=0 //var to keep track of actual # of toc links
    	for (var i=0; i<pdivlinks.length; i++){
    		if (this.css(pdivlinks[i], "toc", "check")){
    			if (toclinkscount>setting.contentdivs.length-1){ //if this toc link is out of range (user defined more toc links then there are contents)
    				pdivlinks[i].style.display="none" //hide this toc link
    				continue
    			}
    			pdivlinks[i].setAttribute("rel", ++toclinkscount) //store page number inside toc link
    			pdivlinks[i][setting.revealtype]=function(){
    				featuredcontentslider.turnpage(setting, this.getAttribute("rel"))
    				return false
    			}
    			setting.toclinks.push(pdivlinks[i])
    		}
    		else if (this.css(pdivlinks[i], "prev", "check") || this.css(pdivlinks[i], "next", "check")){ //check for links with class "prev" or "next"
    			pdivlinks[i].onclick=function(){
    				featuredcontentslider.turnpage(setting, this.className)
    				return false
    			}
    		}
    	}
    	this.turnpage(setting, setting.currentpage, true)
    	if (setting.autorotate[0]){ //if auto rotate enabled
    		pdiv[setting.revealtype]=function(){
    			featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id])
    		}
    		sliderdiv["onmouseover"]=function(){ //stop content slider when slides themselves are clicked on
    			featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id])
    		}
    		sliderdiv["onmouseout"]=function(){ //stop content slider when slides themselves are clicked on
    			featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id])
         	    featuredcontentslider.autorotate(setting)
        	}
    		setting.autorotate[1]=setting.autorotate[1]+(1/setting.enablefade[1]*50) //add time to run fade animation (roughly) to delay between rotation
    	    this.autorotate(setting)
    	}
    },
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    davelf (10-10-2013)

Similar Threads

  1. Feature Content Slider 2.4 - content dissappearing
    By mrgrotey in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 08-31-2010, 03:31 PM
  2. featured content slider auto rotate problem
    By chendra in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 08-03-2009, 06:17 PM
  3. Feature Content Slider overlaps main nav menu
    By RedRhino in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 11-08-2008, 12:31 AM
  4. Featured Content Slider - Content does not rotate on first cycle
    By amimoto in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 06-09-2008, 08:11 AM
  5. Featured Content Slider - Rotate 3 times and stop
    By webmaestro in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 04-01-2007, 05:47 PM

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
  •