That code below gives an error "Expecting more source characters" you may please any help me on this issue.
Thanks
Cengiz Yücel A web developer form Turkey
<script type="text/javascript">
$(document).ready(function () {
$("a#aDevam").hover(function () {
$("div#SekmeBtn").css({ 'background-image': 'url(images/SekmeButonDevam.jpg)'
});
}, function () {
var cssObj = { 'background-color': '#ddd' }
$("div#AA").css(cssObj);
});
</script>
That code below gives an error "Expecting more source characters" you may please any help me on this issue.
Thanks
Cengiz Yücel A web developer form Turkey
<script type="text/javascript">
$(document).ready(function () {
$("a#aDevam").hover(function () {
$("div#SekmeBtn").css({ 'background-image': 'url(images/SekmeButonDevam.jpg)'
});
}, function () {
var cssObj = { 'background-color': '#ddd' }
$("div#AA").css(cssObj);
});
</script>
Share
Improve this question
edited Feb 18, 2011 at 9:25
user241244
asked Feb 18, 2011 at 9:15
Cengiz YücelCengiz Yücel
11 silver badge1 bronze badge
0
3 Answers
Reset to default 5"Expecting more source characters" normally indicates a line that's not terminated and there is one.
var cssObj = { 'background-color': '#ddd' }
needs a semicolon.
check unclosed braces or missed semicolon inside your java script snippet. I got this error whenever I missed a closing brace for a function inside the 'script' tag.
Another mon source that catches C programmers is the opening brace on functions -- (most) javascript programmers put it at the end of the line and (most) C programmers start it on a new line. Doing both is obviously an error:
MyClass.LastFunctionInFile = function() {
{
Foo();
Bar();
}
See it?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744696702a4588535.html
评论列表(0条)