Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-14-2008, 12:31 AM
felyx felyx is offline
Junior Coders
 
Join Date: Jul 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default Stop on mouseover on the content

1) Script Title: Featured Content Slider

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

3) Describe problem:

It is not a problem, it's more like a feature request.

Can this be done: when you move your mouse over the content then the sliding stops and when you move your mouse off the content then it starts sliding again (maybe with a delay)?

Also when you click on the pageination link the content shows and the sliding stops, and you have to restart it, I saw how it can be changed but if you could have a timer to restart sliding so when you move your mouse off the pageination link it would restart the sliding after some time so sliding would not stop would be so much better. Can this be done?
Reply With Quote
  #2  
Old 07-14-2008, 12:41 AM
Nile's Avatar
Nile Nile is offline
Elite Coders
 
Join Date: Jan 2008
Posts: 3,007
Thanks: 10
Thanked 442 Times in 438 Posts
Blog Entries: 5
Default

In contentslider.js find the following(in black), and put in the red.
Code:
		/*
		pdiv[setting.revealtype]=function(){
			featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id])
		}
		sliderdiv["onclick"]=function(){ //stop content slider when slides themselves are clicked on
			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.jumpTo(setting.currentpage, window["fcsautorun"+setting.id])
		}
__________________
Coding is just another puzzle. And it's okay to have help putting together some peices.
Please don't be afraid to ask.
I try to highlight my code with correct syntax highlighting. Unless the its too long. Or I'm to busy.

Last edited by Nile; 07-14-2008 at 01:38 AM.
Reply With Quote
The Following User Says Thank You to Nile For This Useful Post:
felyx (07-14-2008)
  #3  
Old 07-14-2008, 01:07 AM
felyx felyx is offline
Junior Coders
 
Join Date: Jul 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Now it stops when I move my mouse over thanks, but I would like the script to start sliding again when I move my mouse cursor outside the content div and I want this for the pagination links aswell. Can you pelase help me with that aswell?
Reply With Quote
  #4  
Old 07-14-2008, 01:11 AM
Nile's Avatar
Nile Nile is offline
Elite Coders
 
Join Date: Jan 2008
Posts: 3,007
Thanks: 10
Thanked 442 Times in 438 Posts
Blog Entries: 5
Default

It will work for the pagination, now I have to get it to start again.
Edit: Sorry, I cant seem to figure it out
__________________
Coding is just another puzzle. And it's okay to have help putting together some peices.
Please don't be afraid to ask.
I try to highlight my code with correct syntax highlighting. Unless the its too long. Or I'm to busy.

Last edited by Nile; 07-14-2008 at 01:33 AM.
Reply With Quote
  #5  
Old 07-14-2008, 01:33 AM
felyx felyx is offline
Junior Coders
 
Join Date: Jul 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you for your help Nile I am looking for this so long I can't even remember how long exactly.

Btw I did not saw how it will work for the pagination I only saw this sentence in your post:

Quote:
And to make it continue even when you've clicked on the pagination:
Reply With Quote
  #6  
Old 07-14-2008, 01:40 AM
Nile's Avatar
Nile Nile is offline
Elite Coders
 
Join Date: Jan 2008
Posts: 3,007
Thanks: 10
Thanked 442 Times in 438 Posts
Blog Entries: 5
Default

Ok, sorry. That was my mistake. Delete all the changes I made to your script(if you applied them). Then find this line in your code(black), and add the lines in red.
Code:
		/*
		pdiv[setting.revealtype]=function(){
			featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id])
		}
		sliderdiv["onclick"]=function(){ //stop content slider when slides themselves are clicked on
			featuredcontentslider.cleartimer(setting, window["fcsautorun"+setting.id])
		}

		*/
This will only make it keep going. I will still look into making it pause. But I've tried everything I've got.
__________________
Coding is just another puzzle. And it's okay to have help putting together some peices.
Please don't be afraid to ask.
I try to highlight my code with correct syntax highlighting. Unless the its too long. Or I'm to busy.
Reply With Quote
  #7  
Old 07-14-2008, 01:47 AM
felyx felyx is offline
Junior Coders
 
Join Date: Jul 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Don't apologise, you don't have to. Thank you for even trying to help me! Hope someone can figure it out.
Reply With Quote
  #8  
Old 07-14-2008, 01:53 AM
Nile's Avatar
Nile Nile is offline
Elite Coders
 
Join Date: Jan 2008
Posts: 3,007
Thanks: 10
Thanked 442 Times in 438 Posts
Blog Entries: 5
Default

Did you try the script I just gave you? This one will stop if from stopping when you click on the pagination.
__________________
Coding is just another puzzle. And it's okay to have help putting together some peices.
Please don't be afraid to ask.
I try to highlight my code with correct syntax highlighting. Unless the its too long. Or I'm to busy.
Reply With Quote
  #9  
Old 07-14-2008, 02:02 AM
felyx felyx is offline
Junior Coders
 
Join Date: Jul 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

The problem is that I need that delay with both methods. I don't ever want it to constantly stop sliding just for a predefined time interval. When I move my mouse over the content I want it to stop until I move my mouse outside of the content div then it should restart and when I click a pagination link I want it to stop but start again with a delay, lets say 10 sec so I can either move my mouse over the content div to stop sliding and start it again when moving my mouse out of the div or wait 10 seconds read what I want and let it start sliding again.
Reply With Quote
  #10  
Old 07-14-2008, 02:07 AM
Nile's Avatar
Nile Nile is offline
Elite Coders
 
Join Date: Jan 2008
Posts: 3,007
Thanks: 10
Thanked 442 Times in 438 Posts
Blog Entries: 5
Default

I know what you mean, but I can't solve that as I said above.
__________________
Coding is just another puzzle. And it's okay to have help putting together some peices.
Please don't be afraid to ask.
I try to highlight my code with correct syntax highlighting. Unless the its too long. Or I'm to busy.
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:18 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.