我與jQuery鬥爭,我看不出什麼問題在這裏。有什麼建議麼?Jquery - Firefox開發人員工具中的錯誤消息:'SyntaxError:missing;之前的聲明'
Error message in Firefox developer tools: 'SyntaxError: missing ; before statement', in line 1.
jQuery(document).ready(function($){
$(window).scroll(function(){
if ($(this).scrollTop() < 200) {
$('#smoothup') .fadeOut();
} else {
$('#smoothup') .fadeIn();
}
});
$('#smoothup').on('click', function(){
$('html, body').animate({scrollTop:0}, 'fast');
return false;
});
});
是在你的代碼的行號最初,還是你張貼的行號,以證明它的工作,其一個是'1號線'? – therealrootuser 2014-09-01 22:48:35