You are not logged in.

Announcement

Forum database was corrupt and an old backup was restored as temporary replacement. Registrations closed until the database is recovered. Please ask questions using the Contact form

#1 11-06-2013 20:43:35

panfor
Contributors
Registered: 01-06-2013
Posts: 3

How to stop slideshow on mouseover?

I would like to stop slides moving when user moves mouse over slide and start again when moves mouse out. Is this possible? Thanks for any help.

Offline

#2 11-06-2013 21:50:00

chrisly
Contributors
From: Germany
Registered: 05-05-2013
Posts: 80
Website

Re: How to stop slideshow on mouseover?

Should work... Add something with on mouseenter stop... and on mouseleave start... to the js.

Last edited by chrisly (11-06-2013 21:50:53)

Offline

#3 11-06-2013 23:59:19

panfor
Contributors
Registered: 01-06-2013
Posts: 3

Re: How to stop slideshow on mouseover?

I think that I have to modify this code (but what exactly should be changed?) of tileslideshow plugin.js:

$.plugin($siteLoad,{	
	slideShowInit:function(){
		for(var i in slideshowTiles){
			
			nextSlideshow(i,slideshowTiles[i][0],slideshowTiles[i][1],slideshowTiles[i][2]);
		}
		$(".tileSlideshow").on("mouseover","#sl_arrowLeft, #sl_arrowRight",function(){
			$(this).stop().fadeTo(200,1);
		}).on("mouseout","#sl_arrowLeft, #sl_arrowRight",function(){
			$(this).stop().fadeTo(200,0.4);
		}).on("click","#sl_arrowLeft",function(event){
			event.stopPropagation();
			$id = $(this).parent(".tileSlideshow");
			id = $id.attr("id")
			$id.data("n",($id.data("n")-1));
			nextSlideshow(id,slideshowTiles[id][0],slideshowTiles[id][1],slideshowTiles[id][2],-1);
			return false;
		}).on("click","#sl_arrowRight",function(event){	
			event.stopPropagation();
			$id = $(this).parent(".tileSlideshow");
			id = $id.attr("id")
			$id.data("n",($id.data("n")+1));
			nextSlideshow(id,slideshowTiles[id][0],slideshowTiles[id][1],slideshowTiles[id][2],1);
			return false;
		});
	}
}

Offline

#4 12-06-2013 11:25:26

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: How to stop slideshow on mouseover?

Replace line 7 of plugins/tileslideshow/plugin.js by

if($page.current=="home" && !scrolling && $("#"+id+":hover").length ==0 && ($id.hasClass("group"+$group.current) || $id.hasClass("group"+($group.current+1)) || $page.layout == "column")){

Offline

#5 12-06-2013 21:07:36

panfor
Contributors
Registered: 01-06-2013
Posts: 3

Re: How to stop slideshow on mouseover?

Thanks! Almost perfect. Works great but when "arrows"=>true then clicking arrows does nothing.

Offline

Board footer

Powered by FluxBB