-
AuthorPosts
-
September 30, 2016 at 10:50 am #693599
Hi, my customer asked me if it is possible to stop the slideshow for 10 seconds when someone clicks on an image? Do you perhaps have a javascript code-snippet which can accomplish this? Many thanks for your support!
October 1, 2016 at 1:24 am #694112Hey,
Open
js/shortcodes.js
and scroll down to line 4314, under_bindEvents
place this code (after variables declarations):this.$slider.on('click', function(){ $.proxy( this.pause, this) ); setTimeout(function(){ $.proxy( this.resume, this); }, 10000); });
Best regards,
JosueOctober 1, 2016 at 10:41 am #694195Excellent – many thanks!
October 2, 2016 at 8:44 am #694289Hi,
Glad we could help :-)
Please open a new thread if you should have any further questions or problems.
Thanks,
RikardJanuary 6, 2017 at 5:14 pm #730413where exactly can I find the shortcodes.js – can you please specify the full path. many thanks…
January 7, 2017 at 7:24 am #730618January 7, 2017 at 11:21 am #730668Hi, there is no such file in the theme folder – only 2 subfolders (/aviapopup and /mediaelement).
January 9, 2017 at 11:37 am #731069January 9, 2017 at 12:34 pm #731094Sorry but I cannot find the file. I used the following path: /wp-content/themes/enfold/js/
Please specify the exact path using my domain. Many thanks.January 10, 2017 at 3:17 pm #731578okay- sorry I found it and inserted the code snippet at line 4318 after:
_bindEvents: function() { var self = this, win = $( window ); this.$slider.on('click', function(){ $.proxy( this.pause, this) ); setTimeout(function(){ $.proxy( this.resume, this); }, 10000); });
However, this only caused that the slideshow disappeared. Can you let me know where exactly to paste the snippet. many thanks.
January 12, 2017 at 5:50 am #732465Hi,
Please post the WP and FTP details in the private field and we’ll test the code in your installation.
Best regards,
IsmaelJanuary 13, 2017 at 5:43 pm #733244Hi Ismael,
many thanks for your support with this.
Best wishes,
ChrisJanuary 18, 2017 at 5:03 am #735093Hi,
Thank you for the info. We edited the code a bit. Please remove browser cache before checking the page.
Best regards,
IsmaelJanuary 19, 2017 at 4:19 pm #735933Hi Ismael,
many thanks for your support. I think the adjustment does not work properly (cache has been cleared). That is, the slideshow does not stop after clicking a given slide. It should stop for 10sec and resume automatically after that period.
Can you please post the code you inserted/specify the adjustments you made? Many thanks for your efforts.January 24, 2017 at 7:16 am #737551Hi,
I think it’s not noticeable because the interval is also set to 10 seconds. Please set it to 3 seconds then check the page again.
Best regards,
IsmaelJanuary 24, 2017 at 7:21 am #737554Hi,
UPDATE: Do you want the slideshow to resume after 10 seconds when the user click on the navigation buttons? We modified a few lines in the shortcodes.js file.
// public method: shows next image next : function(e) { e.preventDefault(); //this._stopSlideshow(); this._navigate( 'next' ); }, // public method: shows previous image previous : function(e) { e.preventDefault(); //this._stopSlideshow(); this._navigate( 'prev' ); },
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.