Uncaught SyntaxError: Unexpected token var
Posted
by
Bob R
on Stack Overflow
See other posts from Stack Overflow
or by Bob R
Published on 2010-12-30T07:51:44Z
Indexed on
2010/12/30
7:53 UTC
Read the original article
Hit count: 213
JavaScript
|syntax-error
I have an error Uncaught SyntaxError: Unexpected token var displayed between (1) and (2) its a very odd error and it doesn't make sense at all.
if ($hiddenimage.length==0){ //if this is the first time moving over or clicking on the anchor link
var $hiddenimage=$('<img src="'+this.href+'" />').appendTo($hiddenimagediv) //populate hidden div with enlarged image
$hiddenimage.bind('loadevt', function(e){ //when enlarged image has fully loaded
loadarea.empty().append($.thumbnailviewer2.buildimage($, $anchor, s, options)
(1) - var $targetimage=$.thumbnailviewer2.buildimage($, $anchor, s, options) //create reference actual enlarged image
(2) - $loadarea.empty().append($targetimage) //show enlarged image
$.thumbnailviewer2.showimage($targetimage, s)
})
© Stack Overflow or respective owner