Possible Duplicate:
Unexpected token ILLEGAL in webkit未捕获的SyntaxError:意外的标记非法
我写了一个简单的脚本,针对一悬停在这里效力http://jsfiddle.net/paDmg/368/这个网站http://avuedesigns.com/new/ - 它的工作原理上的jsfiddle,但我在我的JavaScript越来越
Uncaught SyntaxError: Unexpected token ILLEGAL
当我把它生活。它在第29行告诉我哪个是结束标记});
$('#hover-grid .indiv-cell').hover(function() {
//set variables to current cell attributes
var cellHeader = $(this).attr('data-hoverheader');
var cellText = $(this).attr('data-hovertext');
var replacementImg = $(this).find('a img').attr('data-replacementimg');
var oringinalImg = $(this).find('a img').attr('src');
//save original image to data variable
$(this).data('origImg', oringinalImg);
//add remove classes
$('#hover-grid .indiv-cell').removeClass('newClass');
$(this).addClass('newClass', 1000);
$(this).find('a img').hide().attr('src', replacementImg).fadeIn(300);
$('.master-cell h1').hide().text(cellHeader).fadeIn(300);
$('.master-cell p').hide().text(cellText).fadeIn(300);
//return false;
}, function() {
$(this).find('a img').hide().attr('src', $(this).data('origImg')).fadeIn(10);
});
检查您的JS像空无效嵌入的字符,这可能会通过的jsfiddle剥离。 –
你的代码只有25行... – Christoph
@Nadim Dayoub:FYI http://bugs.jquery.com/ticket/11731 – elclanrs