Reputation: 42069
I have about 50 lines of JQuery on my site. When I add this line
var img1 = "url('/wp-content/themes/thesis_18/custom/images/map.jpg') repeat";
$(".submit").click(function(){
$("body.custom").css({background: img1});
});
it still works fine, but when I add the following long list of elements (see below) with this css .fadeOut(1000) it breaks all the jQuery on my site. I don't see what's wrong with that new line and, indeed, I tested the simple idea in a fiddle http://jsfiddle.net/mjmitche/FBnrR/6/
Do you see what's wrong with this code below that it's stopping everything on my site?
$(".submit").click(function(){
$("#topnav4, #cloud1, #cloud2, #cloud3, #cloud4, #cloud5, #cloud6,
#intro1, #intro2, #contactform").fadeOut(1000)
$("body.custom").css({background: img1});
});
Upvotes: -1
Views: 54
Reputation: 7427
You miss a ";" at the end of fadeOut() !!
In fiddle, you have JSLint button to verify javascript code...
Upvotes: 1