0

I am a novice at jquery, I have this small code, that I am using, it works well, just noticing a error in chrome "Uncaught Reference Error : $ is not defined".

I am not sure what that means, how can i fix it, Any help would be highly appreciated.

$(function(){
$('.check-required').change(function() {
    $('#id_complete').prop('disabled', $('.check-required').length !== $('.check-required:checked').length);
}).change();

});

$('input[type="checkbox"]').bind('click', function(e) {
     $(this).next().toggleClass("active");   

});

  • Have you added jQuery to your document as well? That sounds common to where jQuery is not being loaded, and as such, the document does not understand $. – danielsan Sep 06 '13 at 00:25

1 Answers1

1

The $ function is defined by the jQuery library. If you're seeing an error about it being undefined, either you haven't loaded jQuery in your HTML document, or it's failing to load for some reason.