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

    I found this thread http://www.kriesi.at/support/topic/stop-products-slider-when-hovering-above-a-product but it was closed to new replies. Can you please make it clear where about in file avia.js we insert this code snippet? Thanks.

    #121485

    Hi,

    Open avia.js and paste the 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);
    });
    });

    At the very bottom of 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);

    Regards,

    Ismael

    #121486

    Thanks for the reply. So this is now added from line 704 after the })(jQuery); However, on a cleared cache. I’m still not getting a pause on the avia slider when I hover over a slide. Is the idea that it should pause on hover, when we get the hand cursor icon?

    Thanks. My url sarahmaysite.wpengine.com home page slider.

    #121487

    In js/avia.js replace:

    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 replace

    jQuery(document).ready(function(){

    with

    jQuery(document).ready(function(){

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

    #121488

    Been away from desk, just to say ‘thanks for the update on this’

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

The topic ‘How to make slider pause on hover.’ is closed to new replies.