Here is some jQuery I have coded:
$(function () {
$('input').click(function() {
$(this).css("background", "-webkit-gradient(linear,left top,left bottom,from(white),to(#DDD))");
)};
)};
I am getting a console err开发者_如何学JAVAor of syntax error at the first )};
. I will probably bang my head against the wall for the next hour because I missed some ridiculously simple bug... but O well thats better than doing that and not finding the bug.
$(function () {
$('input').click(function() {
$(this).css("background", "-webkit-gradient(linear,left top,left bottom,from(white),to(#DDD))");
});
});
You had the parenthesis and curly braces reversed on the last 2 lines!
There are two syntax errors:
- Change this
)};
to this});
, in last row - Change this
)};
to this});
, in pre-last row
:)
精彩评论