3
매끄러운 두루마리가 스크롤되지 않는 Safari (Mac OS 만 해당, Windows는 정상적으로 작동 함)에서 이상한 문제가 있습니다. 단지 링크로 이동하지만 다른 모든 브라우저에서 작동합니다 (Windows Safari에서도 가능).Safari (Mac OS)에서 jQuery 부드러운 스크롤 문제
내 jQuery를이
<script type="text/javascript">
(function($){
$.extend({
smoothAnchors : function(speed, easing, redirect){
speed = speed || "slow";
easing = easing || null;
redirect = (redirect === true || redirect == null) ? true : false;
$("a").each(function(i){
var url = $(this).attr("href");
if(url){
if(url.indexOf("#") != -1 && url.indexOf("#") == 0){
var aParts = url.split("#",2);
var anchor = $("a[name='"+aParts[1]+"']");
if(anchor){
$(this).click(function(){
if($(document).height()-anchor.offset().top >= $(window).height()
|| anchor.offset().top > $(window).height()
|| $(document).width()-anchor.offset().left >= $(window).width()
|| anchor.offset().left > $(window).width()){
$('html, body').animate({
scrollTop: anchor.offset().top,
scrollLeft: anchor.offset().left
}, speed, easing, function(){
if(redirect){
window.location = url
}
});
}
return false;
});
}
}
}
});
}
});
})(jQuery);
</script>
이고 사람이 문제가 알려 주시기 바랍니다 알고 있다면 내 HTML이
<nav id="nav">
<ul id="navigation">
<li><a href="#About" class="fade"> ABOUT</a></li>
<a name="About"></a>
처럼 보인다!
매우 감사드립니다.
감사합니다! 이것은 나를 위해 잘 작동하는 것 같다. 딸꾹질이 뭔지 모르겠지만 100 % 효과가 있습니다! 고맙습니다. – Ben
그것은 Safary, lorry-lags에 늦는다. –
@Ultra 나는 이것이 Alex가 아니라 나에게 문제라고 생각한다. ;-) – yckart