Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 1

How can I change the speed of a Cover Page slide show?


mop1570047754

Question

  • Answers 42
  • Created
  • Last Reply

Recommended Posts

HI @BradKlopman

I was looking for a solution for this as well, and being unable to find one, I created aJavaScript hack that got the job done. This can be inserted via the advanced tab code injection section to allow you to tweak the speed at which images transition:


<script>
window.oldSetTimeout = window.setTimeout;
window.setTimeout = function(code, delay) {
 if (delay == 5000) {
   delay = 2500;
 }
 var retval = window.oldSetTimeout(code, delay);
 return retval;
};
window.oldSetInterval = window.setInterval;
window.setInterval = function(code, delay) {
 if (delay == 5000) {
   delay = 2500;
 }
 var retval = window.oldSetInterval(code, delay);
 return retval;
};
</script>

Link to comment

@bluespainter - You are correct that the numbers correspond to ms... so 5000ms equals 5 seconds (roughly). Browsers can be a little bit hinky about timing though...

That said, the 5000 in my code above MUST match the timing setting of the original slideshow. In this case, I believe 5000 is the most common value for this. In most cases, this value should not be changed. If the them is using a value faster than 5000 (I think there might be some on a delay of 2000ish... then you would need to find the proper value and change it).

The second value (2500) is the one that you would want to change. That's the value the slideshow becomes. So in my example, I changed the default timing of 5 seconds, to 2.5 seconds.

Again, in principle, what we are doing is telling the browser to treat any function call for "5 seconds" as "2.5 seconds". It does require the browser to allow this (most, if not all do).

@sssuperguy - The code I wrote does work. It's a hack, and I fully agree SquareSpace should make this value much easier to change. But it does get the job done. Here's my example (was 5 seconds, now 2.5 seconds): http://www.bachnerco.com/

Link to comment

The Cover Page I created myself in the example above carries your unchanged code in the correct sections but it's still as fast as before. %/ Haha, and when I watch your bachnerco CoverPage (thanks!) it plays with regular speed onethousandone-onethousandtwochange onethousandone-onethousandtwochange… on Chrome, Safari and Firefox.


 1634774572_ezgif.com-gif-maker(12).gif.3836570d51f5ebc97283d974ac23db3b.gifHi, I'm sssupers.
 

Link to comment

OK, sounds good. %) In fact, the original timing ( I removed vour code from my above example now ) sems to be 2.5 seconds. Since I tried all kinds of values, what would I have to place into the code to get a SLOWER timing, let's say 5 seconds? This would be much better for my CoverPage because the pictures are not easy to 'read'. Thank you for your answer. *SSS


 1634774572_ezgif.com-gif-maker(12).gif.3836570d51f5ebc97283d974ac23db3b.gifHi, I'm sssupers.
 

Link to comment

No need to send logins:

window.oldSetTimeout = window.setTimeout;window.setTimeout = function(code, delay) { if (delay == 5000) { delay = 8000; } var retval = window.oldSetTimeout(code, delay); return retval;};window.oldSetInterval = window.setInterval;window.setInterval = function(code, delay) { if (delay == 5000) { delay = 8000; } var retval = window.oldSetInterval(code, delay); return retval;};

Link to comment

@sssuperguy - I just loaded up your site here, and it appears to be moving at 8 seconds to me.... What count do you currently feel you have? What browser are you testing? Are there any javascript errors? Did you clear cache on your machine and reload? (Just trying to see what the cause of it not slowing down for you might be).

Link to comment

@BradKlopman - I took a quick look at the homestead modern page and I could see the code in there... I think the reason it's not working for you is the delay==5000 was changed to delay==1000. I believe both of those need to be left at 5000 as it's basically changing the 5000 to whatever value you put in instead (5000 = 5 seconds).

Hope that helps!

Link to comment

Hi,Thanks @jjdb210 so much for the script. Works great !I would like to go further and control not only the duration of the display but also the speed of the cross-fade itself.Is there an easy way to add this option? I feel that it's too fast as is.

I have a similar option with css to slow down the transitions in my main website galleries:


.slide {
   visibility: visible !important;
   -webkit-transition: opacity 3s ease-in-out;
   -moz-transition: opacity 3s ease-in-out;
   -o-transition: opacity 3s ease-in-out;
   transition: opacity 3s ease-in-out;
}

So I guess it could be the equivalent coded in javascript ? What do you think?

Thanks !!

Link to comment

Hi @jjdb210

I am using your code in my site to control the length of time my slideshow images are being displayed in my cover pages.

I am running into a bit of a problem and it would be great if you could help. I am using 5 second GIFs in the slideshow and would like to have them up on the screen for exactly 5 seconds before dissolving.

I have used different numeric values for the delay but can’t get the GIF on screen for exactly 5 seconds, the dissolve stops the screen time and also pulls frames from the previous GIF. Do you have any suggestions?

Link to comment

@sssuperguy - I just loaded up your site here, and it appears to be moving at 8 seconds to me.... What count do you currently feel you have? What browser are you testing? Are there any javascript errors? Did you clear cache on your machine and reload? (Just trying to see what the cause of it not slowing down for you might be).

Link to comment

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.

×
×
  • Create New...