I have the following code in my page. Sometimes the jquery is loading fine but sometimes i get an error: jQuery is undefined
<script src="/javascripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/javascripts/jquery-ui-1.7.1.custom.min.js"
type="text/javascript"></script>
<script type="text/javascript">
alert('test')
var $j = jQuery.noConflict();
alert('test1')
//start when document is ready
$j(document).ready(function(){
alert('test2')
When jquery does not load I only see first alert
on the page. So I am thinking jQuery is never loaded. Also I am using the noConflict just because before I was gettin error $ is undefined
. I am not using any other js library like prototype or anything. So I dont have any REAL need to use jQuery noConflict()
Has someone come across these kind of problems with jqueyr and IE 7? This error is not happening on Firefox.
Can something be done to fix this?
Update I decided to make use of jquery + jquery ui hosted on google. which worked for me.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>