0

it was working at my computer but when i try to put it in host .. it get this error Uncaught ReferenceError: $ is not defined

<script type="text/javascript" src="/js/common.js"></script>

if($.browser.mozilla||$.browser.opera ){document.removeEventListener("DOMContentLoaded",$.ready,false);document.addEventListener("DOMContentLoaded",function(){$.ready()},false)}
jQuery.event.remove( window, "load", jQuery.ready );
jQuery.event.add( window, "load", function(){ jQuery.ready(); } );

any help ?

Appleshell
  • 6,518
  • 4
  • 41
  • 91
  • It looks odd to use `$` *and* `jQuery` .. and it looks odd to do whatever hack that is supposed to do. Is it required in an appropriately recent jQuery version? Normally, `jQuery(function ($) { .. })` is sufficient .. – user2246674 Jun 05 '13 at 21:41
  • 2
    BTW $.browser has been removed – A. Wolff Jun 05 '13 at 21:41

1 Answers1

2

Load the jQuery library before your script:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
George Cummins
  • 26,731
  • 6
  • 65
  • 89
A. Wolff
  • 72,298
  • 9
  • 84
  • 139