3

ERROR MESSAGE (*Uncaught ReferenceError: jQuery is not defined jquery-ui-1.10.1.custom.js:319 (anonymous function))*

<script src="JS/jquery-ui-1.10.1.custom.js" type="text/javascript"></script>
<script src="JS/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>        
<script src="MODULES/SHK/Js/autoCombo/jquery.ui.core.js" type="text/javascript"></script>
<script src="MODULES/SHK/Js/autoCombo/jquery.ui.position.js" type="text/javascript"></script>
<script src="MODULES/SHK/Js/autoCombo/jquery.ui.widget.js" type="text/javascript"></script>
<script src="MODULES/SHK/Js/autoCombo/jquery.ui.autocomplete.js" type="text/javascript"></script>
<script src="MODULES/SHK/Js/autoCombo/jquery.ui.button.js" type="text/javascript"></script>
<script src="MODULES/SHK/Js/autoCombo/TRYY.js" type="text/javascript"></script>


<script>
    window.onload = aa();
    function aa() {
        $("#combx").combobox({

            selected: function(event, ui) {
                alert(ui.item.value);
            }
        });
    }

</script>
2
  • 4
    It's simply because you haven't included the main jQuery library. Instead you're including UI twice (once minified and once non-minified). Commented Mar 2, 2013 at 10:31
  • Declare jquery you have two declarations of jquery-ui custom, one is the original one while the other is minified. try deleting the other one Commented Mar 2, 2013 at 10:31

3 Answers 3

13

You need to declare the main JQuery library and you have two declarations of jquery-ui-custom, one is the original one and the other is minified version. try deleting the other one. I suggest you just delete the one that is unminified

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="JS/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>  
/** 
 *Your other scripts below 
 */
Sign up to request clarification or add additional context in comments.

Comments

0

While you are using other jquery related plugins, you should declare the jquery minified (jquery-1.8.3.min.js) on the top of other JS.

Since JQuery object has to be defined on jquery-1.8.3.min.js.

Comments

0

get rid of the parenthesis!

window.onload = aa();//this runs aa instantly, not on window.onload

window.onload = aa;//this gives window.onload event a function to execute when it's time

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.