모든, 를로드하지 :jQuery를 나는 다음과 같은 코드를 가지고 DOM 창에
$(document).ready(function() {
// more code using $ as alias to jQuery
alert('it works');
},'jQuery');
페이지가로드 나는 다음과 같은 오류 얻을 때 :
Uncaught TypeError: Property '$' of object [object DOMWindow] is not a function
내가 전에 jQuery를로드 한을 나는 이것을 추가하려고 노력했다. 이 작동하지 않습니다 이유에
<script type='text/javascript' src='http://localhost/oml_live_update/wp-includes/js/jquery/jquery.js?ver=1.7.1'></script>
<script type='text/javascript' src='http://localhost/oml_live_update/wp-content/themes/alyeska/framework/frontend/assets/plugins/prettyphoto/js/jquery.prettyPhoto.js?ver=3.1.3'></script>
<script type='text/javascript' src='http://localhost/oml_live_update/wp-content/themes/alyeska/framework/frontend/assets/js/superfish.js?ver=1.4.8'></script>
<script type='text/javascript' src='http://localhost/oml_live_update/wp-content/themes/alyeska/framework/frontend/assets/js/flexslider.js?ver=1.8'></script>
<script type='text/javascript' src='http://localhost/oml_live_update/wp-content/themes/alyeska/framework/frontend/assets/js/roundabout.js?ver=1.1'></script>
<script type='text/javascript' src='http://localhost/oml_live_update/wp-content/themes/alyeska/assets/js/alyeska.min.js?ver=1.0'></script>
<script type='text/javascript' src='http://localhost/oml_live_update/wp-content/themes/alyeska/assets/js/custom.js?ver=1.0'></script>
모든 아이디어 :이로드 된 방법은 다음과
는 (내 코드가 custom.js이다)인가?
이 코드 앞뒤에 jquery 스크립트를로드하는시기는 언제입니까? – Gabe
이 코드 앞에 jQuery 파일을 추가 했습니까? –
뭔가 잘못하고 있습니다. jquery 파일을 포함 할 수도 있습니다. 그것은 작동합니다 [jsfiddle] (http://jsfiddle.net/DD5jJ/) – Dips