Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #240159

    Hi!
    i’ve a problem on my home page with horizontal product slideshow.
    Shop Slider Row = 1
    The slider is autorotate.
    But no pause of the slide when Hover on a product picture …
    Can you help me please ?
    How can i insert a pause for the slide when Hover ?

    #240174

    With these modifications the slide is stopped when “Hover” but it doesn’t restart on the “OUT” !!!!!!!

    i have just modify avia.js.
    Insert THIS CODE :

    var containers = jQuery(‘.thumbnail_container’);
    containers.each(function()
    {
    var container1 = jQuery(this), buttons = container1.find(‘.button’);
    container1.containerHeight = container1.height()/2;
    container1.hover(
    function()
    {
    clearInterval(document.interval);
    },
    function()
    {
    document.interval = setInterval(function()
    {
    container.methods.setSlideNumber();
    },
    options.autorotationInterval);
    });
    });

    AFTER THIS CODE :

    //

    // Toggle shortcode javascript
    //

    (function($)
    {
    $.fn.avia_sc_toggle = function(options)
    {
    var defaults =
    {
    heading: ‘.toggler’,
    content: ‘.toggle_wrap’
    };

    var options = $.extend(defaults, options);

    return this.each(function()
    {
    var container = $(this),
    heading = $(options.heading, container),
    allContent = $(options.content, container),
    initialOpen = ”;

    //check if the container has the class toggle initial open.
    // if thats the case extract the number from the following class and open that toggle
    if(container.is(‘.toggle_initial_open’))
    {
    var myRegexp = /toggle_initial_open__(d+)/;
    var match = myRegexp.exec(container[0].className);

    if(match != null && parseInt(match[1]) > 0)
    {
    initialOpen = parseInt(match[1]);
    }
    }

    heading.each(function(i)
    {
    var thisheading = $(this),
    content = thisheading.next(options.content, container);

    if(initialOpen == (i+1)) { content.css({display:’block’}); }

    if(content.is(‘:visible’))
    {
    thisheading.addClass(‘activeTitle’);
    }

    thisheading.bind(‘click’, function()
    {
    if(content.is(‘:visible’))
    {
    content.slideUp(300);
    thisheading.removeClass(‘activeTitle’);
    }
    else
    {
    if(container.is(‘.toggle_close_all’))
    {
    allContent.slideUp(300);
    heading.removeClass(‘activeTitle’);
    }
    content.slideDown(300);
    thisheading.addClass(‘activeTitle’);
    }
    });
    });
    });
    };
    })(jQuery);

    AND MODIFY :

    if(options.autorotation)
    {
    interval = setInterval(function()
    {
    container.methods.setSlideNumber();
    },
    options.autorotationInterval);
    }

    WITH :

    if(options.autorotation)
    {
    interval = setInterval(function()
    {
    if(container.hasClass(‘autoslide_false’))
    {
    options.autorotation = false;
    clearInterval(interval);
    }
    else
    {
    container.methods.setSlideNumber();
    }
    },
    options.autorotationInterval);
    }

    AND MODIFY :

    jQuery(document).ready(function(){

    WITH :

    jQuery(document).ready(function(){

    jQuery(‘.shop_slider_yes’).on(‘hover’, function() { jQuery(this).children().addClass(‘autoslide_false’); });

    With this modifications, the slide is stopped when on Hover but it doesn’t restart if we leave the “hover” (escuse me for my english !)

    • This reply was modified 7 months, 1 week ago by  jus2pom.
    • This reply was modified 7 months, 1 week ago by  jus2pom.
    #241120

    Hey!

    This solution is way too complex :) – just open up wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/productslider.php and replace:

    
    $data = AviaHelper::create_data_string(array('autoplay'=>$autoplay, 'interval'=>$interval, 'animation' => $animation));
    

    with

    
    $data = AviaHelper::create_data_string(array('autoplay'=>$autoplay, 'interval'=>$interval, 'animation' => $animation, 'hoverpause'=>1));
    

    Best regards,
    Peter

    #243368

    Hey Dude,
    Thank you very much for your help but we are in the “Abundance” Theme section.
    There is no config-templatebuilder or avia-shortcode folder …

    #244245

    Hi!

    Yes, please excuse my reply. I didn’t check the theme name :)
    You can try to replace this code:

    
    					if(options.autorotation)
    					{
    						interval = setInterval(function()
    						{ 	
    							container.methods.setSlideNumber();
    						},
    						options.autorotationInterval);
    					}
    

    with

    
    					if(options.autorotation)
    					{
    						interval = setInterval(function()
    						{ 	
    							container.methods.setSlideNumber();
    						},
    						options.autorotationInterval);
    
                            container.hover(
                                  function(){clearInterval(interval)},
                                  function(){interval = setInterval(function(){container.methods.setSlideNumber();}, options.autorotationInterval);}
                            );
    					}
    

    Cheers!
    Peter

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.