jquery - $ is not defined - But i can see that it is and is being loaded -


i have odd question.

i trying implement simple logic on radio buttons , checkboxes on web application. however, when attempt run application, receiving following error in firefox:

referenceerror: $ not defined

my jquery:

$( document ).ready(function() {  alert("test js file loaded");   jquery('#ctrl').click(function () {          jquery('#ctrldec').attr('disabled', true);         jquery('#out').attr('value', 'n');  });  jquery('#ctrl1').click(function () {      jquery('#ctrldec').attr('disabled', false);     jquery('#out').attr('value', 'y');  });  }); 

when debugging in firefox, can see:

<script type="text/javascript" src="javascript/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="javascript/modernizr-2.6.2.min.js"></script> 

and have checked file exists, named correctly , contains plugin code.

as site using framesets (old web site getting rid of framesets), can see:

<script type="text/javascript" src="javascript/jquery-1.9.1.min.js"></script> 

is imported again..

important twice shouldn't cause issue, should it??

you have conflict jquery's global $. make sure load jquery before run main javascript, , measure, replace:

$( document ).ready(function() { ... } 

...with:

jquery( document ).ready(function() { ... } 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -