jQuery(document).ready(function(){
jQuery(window).scroll(function(){
if (jQuery(this).scrollTop() > 600) {
jQuery('.scrollup').fadeIn();
} else {
jQuery('.scrollup').fadeOut();
}
if(jQuery(this).scrollTop() < 600) {
jQuery('.scrolldown').fadeIn();
}else {
jQuery('.scrolldown').fadeOut();
}
});
jQuery('.scrollup').click(function(){
jQuery("html, body").animate({ scrollTop: 0 }, 900);
return false;
});
jQuery('.scrolldown').click(function() {
jQuery("html, body").animate({ scrollTop: jQuery(document).height()-jQuery(window).height() }, 900);
return false;
});
});
Wordpress 사이트에서 페이지 스크롤러에 대해이 코드를 사용해 보았습니다. 라이브 사이트가 아닌 localhost에서 실행할 때 작동합니다. 라이브 사이트에서 작동하지 않는 이유는 무엇입니까?jQuery가 라이브 Wordpress 사이트에서 작동하지 않습니다.
내가 (방화범 통해) 자바 스크립트 콘솔에서이 오류를 얻을 : 당신의 선택은 지금까지 내가 말할 수있는
var store_cur_pos_top = $(".author_cont").offset().top;
을 실패하고, 우선 들어
TypeError: invalid 'in' operand e
[Break On This Error]
...pe);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.node...
jquery.min.js (line 5)
TypeError: invalid 'in' operand e
[Break On This Error]
...pe);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.node...
jquery.min.js (line 5)
TypeError: invalid 'in' operand e
[Break On This Error]
...pe);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.node...
jquery.min.js (line 5)
TypeError: invalid 'in' operand e
[Break On This Error]
...pe);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.node...
jquery.min.js (line 5)
TypeError: invalid 'in' operand e
[Break On This Error]
...pe);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.node...
jquery.min.js (line 5)
TypeError: invalid 'in' operand e
[Break On This Error]
...pe);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.node...
jquery.min.js (line 5)
TypeError: invalid 'in' operand e
[Break On This Error]
...pe);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.node...
당신이 jQuery를 수입하고, 위의 코드가 문서에 표시되기 전에 그렇게하고 있습니까 :
여기가 해결 Mootools의/jQuery를 충돌에 대한 유용한 게시물입니까? 브라우저 콘솔에 오류가 있습니까? – Pointy
위의 스크립트를 사용하여 을 연결했고 또한 –
의 오류가 발생했습니다. TypeError : invalid ' in 'operand e [이 오류 발생시 중단] \t ... pe); return e} x.each ({parent : function (e) {var t = e.parentNode; return t && 11! == t.node 기능 :; ... jquery.min.js (라인 5) 형식 오류 리턴 E} x.each ({상위 잘못된 피연산자 E '에서'는 \t ... 을 PE)이 오류 휴식] (e) {var t = e.parentNode; return t && 11! == t.node ... jquery.min.js (line 5) 유형 오류 : 'in'피연산자가 잘못되었습니다. [이 오류 발생시 중단] \t ... pe); return e} x.each ({parent : function (e) {var t = e.parentNode; return t && 11! = = t.node ... jquery.min.js (행 5) –