looky

1128 经验值

具体该怎么引入呢,有劳了,多谢多谢。

请帮我看看这个顺序可以不?抱拳。下面的是head部分
<head>

<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<title>@yield('title')</title>
<meta name="keywords" content="@yield('keywords')" />
<meta name="description" content="@yield('description')" />
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="{ mix('/static/app.css') }">
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdn.bootcss.com/1000hz-bootstrap-validator/0.11.9/validator.min.js"></script>
<script src="https://cdn.bootcss.com/jquery_lazyload/1.9.7/jquery.lazyload.min.js"></script>
<script src="https://cdn.bootcss.com/store.js/1.3.20/store+json2.min.js"></script>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
  <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

</head>

下面部分是</body>后面的内容:

<script src="{ mix('/static/app.js') }"></script>   <!-- 这里是我定义的js  -->
  <script src="//cdn.bootcss.com/prefixfree/1.0.7/prefixfree.min.js"></script>
  <script>
    $('#search_btn').click(function(){
      if($('#search_input').val() == ''){
        $('#search_input').focus();
        return false;
      }
    });
  </script>

------------------------------------
js里被模态框方法引用的函数:
function loginFail(info) {
    loginShowInfo('<span class="glyphicon glyphicon-remove icon fail-icon"></span> <br><span class="success-info">' + info + '</span> <br> <button type="button" class="btn btn-info" onclick="loginModalLoad">返回</button> <br><br>');
    $('#loginModal').modal('hide');
}
// 上面? 函数被同一个js引用的位置:
$('#registerModal .loginButton2').on('click', function() {
    ...
    $.post('/login', {email: emailElements.val(), password: passwordElements.val()}).
        done(function(data) {   // 登录成功
            console.log(data);
            loginSuccess();
        });
    });

求教!使用mix编译js后,js内调用的bootstrap的模态框组件方法$('#myModal').modal('show')时,提示“.modal()”方法不存在。但如果不编译js,直接加载原始的js就没问题。该怎么做呢,谢谢。?