0
jquery-1.4.3.min.js를 사용하는 이전 프로젝트를 업데이트하고 있습니다. 이것은 제가 작업하고 있던 새로운 것들을 방해하고 있었기 때문에 최신 버전으로 대체해야했습니다. 그리고 지금 Uncaught를 얻습니다. TypeError : 정의되지 않은 'substr'속성을 읽을 수 없습니다.Uncaught TypeError : 정의되지 않은 Jquery의 속성 'substr'을 읽을 수 없습니다.
잠시 동안이 작업을하고 있었고 나는 혼란 스럽습니다. 어떤 도움이라도 대단히 감사합니다!
$(window).scroll(function() {
$inview = $('section:in-viewport header').parent().attr('id');
if ($('a[hash=#' + $inview + ']') !== null) {
$link = $('a[hash=#' + $inview + ']').parent().attr('id').substr(4);
}
if ($link != $nCurrentActive && scrolling == 1) {
$nav.removeClass('active');
offMenu($nCurrentActive);
$nCurrentActive = $link;
$('#nav-'+$nCurrentActive).addClass('active');
onScrollMenu($nCurrentActive);
}
});
안녕하세요. 일부 HTML로 피들을 제공 할 수 있습니까? – kuldipem
ID에'','''또는'[space]'문자가 포함되어있는 경우 속성 선택기를 제대로 이스케이프하고 싶을 수 있습니다. – Terry