jQuery noob 여기를 확인하십시오. 구문이 잘못되었습니다. Chrome 콘솔에서 예기치 않은 입력의 끝이 표시됩니다.Javascript/jQuery | 잡히지 않은 SyntaxError : 예기치 않은 입력의 끝?
<script>
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|| location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
</script>
가 어떻게이 문제로 시작하는이 알고 파일을 HTML 페이지에이 코드를 붙여 넣기 또는 당신이 경우 순수한 JS에서
<script>
태그를 제거해야합니까? – Alexander내 사이트의 라인 21에 표시되어 있기 때문에 –
해당 소스를 모두 붙여 넣으십시오. – Alexander