問題描述
Safari 的 jQuery 問題 (jQuery problem with Safari)
Can anyone shed some light on why this works in Firefox but not in Safari? You can see the problem here: http://www.thechangestudio.com/index2.php
Thanks
<script type="text/javascript">
$(document).ready(function() {
$("ul#topnav li").hover(
function() {
$(this).find("span").stop(true, true).slideDown(1000);
return false;
}, function() {
$(this).find("span").slideUp(500);
return false;
});
});
</script>
參考解法
方法 1:
Webkit browsers (Safari, Chrome) and Opera will only animate span
elements in certain positions within the parent element. Use a different element for your animation such as a div
or an anchor
.