jQuery hide()不适用于safari

时间:2016-05-15 21:27:10

标签: jquery html safari zurb-foundation

我对移动游猎有一个非常具体的问题。当我在Chrome中使用.show()或.hide()作为我的菜单时,它可以工作。但在Safari上它确实显示,但不会隐藏菜单。显示:块只保持存在。不知道如何解决,我发现的一切都无济于事。

<!doctype html>
<html class="no-js" lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Foundation for Sites</title>
<link rel="stylesheet" href="css/foundation.css">
<link rel="stylesheet" href="css/app.css">
<link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"><script type="text/javascript">
    $(document).bind("mobileinit", function () {
        // jQuery Mobile's Ajax navigation does not work in all cases (e.g.,
        // when navigating from a mobile to a non-mobile page), especially when going back, hence disabling it.
        $.extend($.mobile, {
            ajaxEnabled: false
        });
    });
</script>

<script src="js/vendor/what-input.js"></script>
<script src="js/vendor/foundation.js"></script>

<script src="js/app.js"></script>

$(document).foundation();


$('#menu').click(function(){
  $('#side-menu').show( "slide", 700 );
  $('#overlay').show( "fade", 700 );
});

$('#close').click(function(){
  $('#side-menu').hide( "slide", 700 );
  $('#overlay').hide( "fade", 700 );
});

$('.overlay').click(function(){
  $('#side-menu').hide( "slide", 700 );
  $('#overlay').hide( "fade", 700 );
});

$('#side-menu > a').click(function(){
  $('#side-menu').hide( "slide", 700 );
  $('#overlay').hide( "fade", 700 );
});

$('#side-menu > li').click(function(){
  $('#side-menu').hide( "slide", 700 );
  $('#overlay').hide( "fade", 700 );
});

0 个答案:

没有答案