Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #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!

    #694112

    Hey,

    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,
    Josue

    #694195

    Excellent – many thanks!

    #694289

    Hi,

    Glad we could help :-)

    Please open a new thread if you should have any further questions or problems.

    Thanks,
    Rikard

    #730413

    where exactly can I find the shortcodes.js – can you please specify the full path. many thanks…

    #730618

    Hi,

    Enfold theme folder->js->shortcodes.js

    Best regards,
    Rikard

    #730668

    Hi, there is no such file in the theme folder – only 2 subfolders (/aviapopup and /mediaelement).

    #731069

    Hi,

    see here: http://imgur.com/a/bOFgK

    Best regards,
    Andy

    #731094

    Sorry 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.

    #731578

    okay- 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.

    #732465

    Hi,

    Please post the WP and FTP details in the private field and we’ll test the code in your installation.

    Best regards,
    Ismael

    #733244

    Hi Ismael,
    many thanks for your support with this.
    Best wishes,
    Chris

    #735093

    Hi,

    Thank you for the info. We edited the code a bit. Please remove browser cache before checking the page.

    Best regards,
    Ismael

    #735933

    Hi 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.

    #737551

    Hi,

    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,
    Ismael

    #737554

    Hi,

    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

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.