• Resolved bigalreturns

    (@bigalreturns)


    In your JS that calls the homepage slider there is a small error in the code at lines 12-55. You define the var slideAuto, then iterate through the rslides-containers looking for a data-speed attribute, and then use it to set another variable (slideSpeed). However at the point when you come to use these variables (lines 36 and 38) they are no longer in scope so are not passed to the responsiveSlides constructor.
    Can fix simply by defining the two variables in a shared scope e.g. code below:

    `jQuery(document).ready(function () {

    var slideAuto; // This is the new
    var slideSpeed; // variable declaration

    jQuery( ‘.rslides-inner .slides’ ).each( function(i) {

    // Set slides to transition automatically
    slideAuto = true;

    // Set transition time between slides
    if ( ! jQuery( this ).closest( ‘.rslides-container’ ).attr(‘data-speed’) ) {
    slideSpeed = 1000;
    } else {
    slideSpeed = jQuery( this ).closest( ‘.rslides-container’ ).attr(‘data-speed’)

    // Disable auto-scroll if slider speed id equal to 0
    if ( slideSpeed == ‘off’ ) {
    slideSpeed = null;
    slideAuto = false;
    }
    }

    jQuery( this ).responsiveSlides({
    auto: slideAuto, // Boolean: Animate automatically, true or false NOT IN SCOPE HERE BEFORE
    speed: 1000, // Integer: Speed of the transition, in milliseconds
    timeout: slideSpeed, // Integer: Time between slide transitions, in milliseconds NOT IN SCOPE HERE BEFORE
    pager: false, // Boolean: Show pager, true or false
    nav: false, // Boolean: Show navigation, true or false
    random: false, // Boolean: Randomize the order of the slides, true or false
    pause: false, // Boolean: Pause on hover, true or false
    pauseControls: true, // Boolean: Pause when hovering controls, true or false
    prevText: ” “, // String: Text for the “previous” button
    nextText: ” “, // String: Text for the “next” button
    maxwidth: “”, // Integer: Max-width of the slideshow, in pixels
    navContainer: “”, // Selector: Where controls should be appended to, default is after the ‘ul’
    manualControls: “”, // Selector: Declare custom pager navigation
    namespace: “rslides”, // String: Change the default namespace used
    before: function(){}, // Function: Before callback
    after: function(){} // Function: After callback
    });

    });
    });

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter bigalreturns

    (@bigalreturns)

    Ignore me

    Hi bigalreturns, after this fix the slider work?
    Thanks

    Hi, I fix the slider:
    wp-content/themes/melos/admin/main/options/02.homepage.php
    In the line 148 I change the original value:
    linea 148: $thinkup_homepage_sliderspeed = ‘OFF’;

    For:
    $thinkup_homepage_sliderspeed = ‘10000’;

    Enjoy, Ramiro

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug Report’ is closed to new replies.