Getting SyntaxError: missing} in jint JavaScript compound statement error (using jQuery)

Why am I getting "SyntaxError: missing" in compound statement "on the last line of this code:

var currentMonth = 1;
$(document).ready(function(){
    $("#left").click(function(){
        $("#calendar").animate({opacity: "0"},"slow",function(){
            if (currentMonth === 1) {
                currentMonth = 12;
            }
        });
    });
});

      

in jslint to test my code. Could you please tell me which part I am wrong on, I am still new to jQuery.

Thanks in advance!

+3


source to share





All Articles