• Resolved Imagepereubu

    (@pereubu)


    hi, I added this jQuery code to the plugin (FYI the site is not online, I’m coding in local) :

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

    animateProgress();

    function animateProgress() {
    $(‘.progress .progress-bar’).each(function() {
    var bottom_object = $(this).offset().top + $(this).outerHeight();
    var bottom_window = $(window).scrollTop() + $(window).height();
    var progressWidth = $(this).data(‘progress-value’) + ‘%’;
    if (bottom_window > bottom_object) {
    $(this).css({
    width: progressWidth
    });
    $(this).find(‘.progress-value’).animate({
    countNum: parseInt(progressWidth, 10)
    }, {
    duration: 2000,
    easing: ‘swing’,
    step: function() {
    $(this).text(Math.floor(this.countNum) + ‘%’);
    },
    complete: function() {
    $(this).text(this.countNum + ‘%’);
    }
    });
    };
    });
    };
    });

    And keep getting error message from the console : “Uncaught ReferenceError: jQuery is not defined at (index):433”

    • This topic was modified 5 years, 3 months ago by Imagepereubu.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Imagepereubu

    (@pereubu)

    I found a solution using the “header and footer scripts” plugin, adding jQuery library through this code in the header :

    <script src=”//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js”></script>

    <script>
    window.jQuery || document.write(‘<script src=”http://mysite.com/jquery.min.js”>&lt;\/script>’))
    </script>

    Plugin Author ImageSilkyPress

    (@diana_burduja)

    The jQuery library is part of the WordPress core and is automatically loaded.

    The “jQuery is not defined” error might show up if, for whatever reasons, the jQuery library is removed from the frontend or later loaded.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘jQuery is not defined’ is closed to new replies.