• Resolved nathanagin

    (@nathanagin)


    I’ve installed the theme here: https://nathanagin.info/kinsey/

    I’ve made a number of changes within the Theme Options and everything has been fine EXCEPT Slider Speed (pauseTime).

    I see in the function.php file there is this script (just ONE instance of it)

    <script type="text/javascript">
        jQuery(window).load(function() {
    		// nivoslider init
    		jQuery('#nivo') .nivoSlider({
    				effect: 'random',
    				animSpeed:700,
    				pauseTime:<?php echo of_get_option('sliderspeed_text'); ?>,
    				startSlide:0,
    				slices:10,
    				directionNav:true,
    				directionNavHide:true,
    				controlNav:true,
    				controlNavThumbs:false,
    				keyboardNav:true,
    				pauseOnHover:true,
    				captionOpacity:0.8,
    				afterLoad: function(){
    						if (jQuery(window).width() < 480) {
    					jQuery(".nivo-caption ").animate({"opacity": "1", "right":"0"}, {easing:"easeOutBack", duration: 500});
    
    						}else{
    					jQuery(".nivo-caption").animate({"opacity": "1", "bottom":"15%"}, {easing:"easeOutBack", duration: 500});
    					jQuery(".nivo-caption ").has('.sld_layout3').addClass('sld3wrap');
    							}
    				},
    				beforeChange: function(){
    					jQuery(".nivo-caption ").animate({bottom:"-500px"}, {easing:"easeInBack", duration: 500});
    					//jQuery(".nivo-caption").delay(400).removeClass('sld3wrap');
    					jQuery('.nivo-caption ').animate({"opacity": "0"}, 100);
    					jQuery('.nivo-caption ').delay(500).queue(function(next){
    						jQuery(this).removeClass("sld3wrap");next();});
    
    				},
    				afterChange: function(){
    						if (jQuery(window).width() < 480) {
    					jQuery(".nivo-caption ").animate({"opacity": "1", "bottom":"0"}, {easing:"easeOutBack", duration: 500});
    						}else{
    					jQuery(".nivo-caption ").animate({"opacity": "1", "bottom":"15%"}, {easing:"easeOutBack", duration: 500});
    					jQuery(".nivo-caption ").has('.sld_layout3').addClass('sld3wrap');
    							}
    				}
    			});
    	});
    
    </script>

    When I load the site and look at the code on the page, I can see TWO javascripts running—the site seems to be only paying attention to the first (5000 milliseconds – no idea where this is coming from), not the second (11000 milliseconds – what I entered in Theme Options). How do I resolve this?

    <script type="text/javascript">
        jQuery(window).load(function() {
    		// nivoslider init
    		jQuery('#nivo').nivoSlider({
    				effect: 'random',
    				animSpeed:700,
    				pauseTime:5000,
    				startSlide:0,
    				slices:10,
    				directionNav:true,
    				directionNavHide:true,
    				controlNav:true,
    				controlNavThumbs:false,
    				keyboardNav:true,
    				pauseOnHover:true,
    				captionOpacity:0.8,
    				afterLoad: function(){
    
    						if (jQuery(window).width() < 480) {
    					jQuery(".nivo-caption ").animate({"opacity": "1", "right":"0"}, {easing:"easeOutBack", duration: 500});
    
    						}else{
    					jQuery(".nivo-caption").animate({"opacity": "1", "bottom":"15%"}, {easing:"easeOutBack", duration: 500});
    					jQuery(".nivo-caption ").has('.sld_layout3').addClass('sld3wrap');
    
    							}
    				},
    				beforeChange: function(){
    					jQuery(".nivo-caption ").animate({bottom:"-500px"}, {easing:"easeInBack", duration: 500});
    					//jQuery(".nivo-caption").delay(400).removeClass('sld3wrap');
    					jQuery('.nivo-caption ').animate({"opacity": "0"}, 100);
    					jQuery('.nivo-caption ').delay(500).queue(function(next){
    						jQuery(this).removeClass("sld3wrap");next();});
    
    				},
    				afterChange: function(){
    						if (jQuery(window).width() < 480) {
    					jQuery(".nivo-caption ").animate({"opacity": "1", "bottom":"0"}, {easing:"easeOutBack", duration: 500});
    						}else{
    					jQuery(".nivo-caption ").animate({"opacity": "1", "bottom":"15%"}, {easing:"easeOutBack", duration: 500});
    					jQuery(".nivo-caption ").has('.sld_layout3').addClass('sld3wrap');
    							}
    				},
    
    <script type="text/javascript">
        jQuery(window).load(function() {
    		// nivoslider init
    		jQuery('#nivo') .nivoSlider({
    				effect: 'random',
    				animSpeed:700,
    				pauseTime:11000,
    				startSlide:0,
    				slices:10,
    				directionNav:true,
    				directionNavHide:true,
    				controlNav:true,
    				controlNavThumbs:false,
    				keyboardNav:true,
    				pauseOnHover:true,
    				captionOpacity:0.8,
    				afterLoad: function(){
    						if (jQuery(window).width() < 480) {
    					jQuery(".nivo-caption ").animate({"opacity": "1", "right":"0"}, {easing:"easeOutBack", duration: 500});
    
    						}else{
    					jQuery(".nivo-caption").animate({"opacity": "1", "bottom":"15%"}, {easing:"easeOutBack", duration: 500});
    					jQuery(".nivo-caption ").has('.sld_layout3').addClass('sld3wrap');
    							}
    				},
    				beforeChange: function(){
    					jQuery(".nivo-caption ").animate({bottom:"-500px"}, {easing:"easeInBack", duration: 500});
    					//jQuery(".nivo-caption").delay(400).removeClass('sld3wrap');
    					jQuery('.nivo-caption ').animate({"opacity": "0"}, 100);
    					jQuery('.nivo-caption ').delay(500).queue(function(next){
    						jQuery(this).removeClass("sld3wrap");next();});
    
    				},
    				afterChange: function(){
    						if (jQuery(window).width() < 480) {
    					jQuery(".nivo-caption ").animate({"opacity": "1", "bottom":"0"}, {easing:"easeOutBack", duration: 500});
    						}else{
    					jQuery(".nivo-caption ").animate({"opacity": "1", "bottom":"15%"}, {easing:"easeOutBack", duration: 500});
    					jQuery(".nivo-caption ").has('.sld_layout3').addClass('sld3wrap');
    							}
    				}
    			});
    	});
    
    </script>
    
    			});
    
    	});
    </script>
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter nathanagin

    (@nathanagin)

    I discovered the TOP script (where pauseTime=5000) is actually IN the functions.php file.

    The issue is that I’ve created a child theme, so how do I deactivate or override that first script in the parent functions.php file?

    no need to touch slider code . just go to theme option =>slider tab => slider speed

    thanks

    Thread Starter nathanagin

    (@nathanagin)

    I neglected to specifically mention above that I did change the Slider Speed within Theme Options, but the site appears to ignore that.

    I am tracking the seconds of the slider, and it always changes at 5 seconds, not 11 as I have put in to test.

    Thanks!

    Thread Starter nathanagin

    (@nathanagin)

    Running WP 4.1.1 with only these plugins active:

    -TinyMCE Advanced
    -BackUpBuddy
    -Gravity Forms
    -Child Theme Configurator

    I have tested by deactivating ALL plugins and there is no change.

    The only change happens when I comment out (<!– –>) the FIRST section of javascript (with speed = 5000 ms) in the parent theme’s functions.php file, as I currently have it.

    Now, the slider responds to 11000 miliseconds, not 5000.

    However, I also know this is not sustainable if the parent theme needs to be updated (the functions file will be overwritten).

    HI,

    SORRY FOR LATE REPLAY

    their is a issue . i will fix in next update . now remove those code from function.php

    <script type="text/javascript">
        jQuery(window).load(function() {
    		// nivoslider init
    		jQuery('#nivo').nivoSlider({
    				effect: 'random',
    				animSpeed:700,
    				pauseTime:5000,
    				startSlide:0,
    				slices:10,
    				directionNav:true,
    				directionNavHide:true,
    				controlNav:true,
    				controlNavThumbs:false,
    				keyboardNav:true,
    				pauseOnHover:true,
    				captionOpacity:0.8,
    				afterLoad: function(){
    
    						if (jQuery(window).width() < 480) {
    					jQuery(".nivo-caption ").animate({"opacity": "1", "right":"0"}, {easing:"easeOutBack", duration: 500});
    
    						}else{
    					jQuery(".nivo-caption").animate({"opacity": "1", "bottom":"15%"}, {easing:"easeOutBack", duration: 500});
    					jQuery(".nivo-caption ").has('.sld_layout3').addClass('sld3wrap');
    
    							}
    				},
    				beforeChange: function(){
    					jQuery(".nivo-caption ").animate({bottom:"-500px"}, {easing:"easeInBack", duration: 500});
    					//jQuery(".nivo-caption").delay(400).removeClass('sld3wrap');
    					jQuery('.nivo-caption ').animate({"opacity": "0"}, 100);
    					jQuery('.nivo-caption ').delay(500).queue(function(next){
    						jQuery(this).removeClass("sld3wrap");next();});
    
    				},
    				afterChange: function(){
    						if (jQuery(window).width() < 480) {
    					jQuery(".nivo-caption ").animate({"opacity": "1", "bottom":"0"}, {easing:"easeOutBack", duration: 500});
    						}else{
    					jQuery(".nivo-caption ").animate({"opacity": "1", "bottom":"15%"}, {easing:"easeOutBack", duration: 500});
    					jQuery(".nivo-caption ").has('.sld_layout3').addClass('sld3wrap');
    							}
    				},
    
    			});
    
    	});
    </script>

    mean the 1st one

    Thread Starter nathanagin

    (@nathanagin)

    great, thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cannot change slider speed’ is closed to new replies.