2016-09-20 37 views
0

我有以下代码,并且我得到了“$未定义”结果,而document.ready脚本无法正常工作。我在网上查了很多不同的问题,但我无法弄清楚。

<script src="scripts/jquery-3.1.0.js"></script> 
<script src="scripts/jquery.min.js"></script> 
<script src="scripts/jquery.mobile.min.js"></script> 
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script> 

<script> 
    $(document).ready (function() { 
     $("body>[data-role='panel']").panel(); 
    }); 
</script> 
+0

你为什么包括3个jQuery的来源是什么? – Li357

+0

你不应该加载3份jquery。 – Barmar

+1

大声笑...没有足够的jQuery! – 2016-09-20 21:55:36

回答

0

尝试这个

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 

    <script> 
    $(document).ready(function(){ 
    $("body>[data-role='panel']").panel(); 
    }); 
</script>