tags:

views:

111

answers:

3

Hello,

I have the following jQuery code (simplified for question purposes):

$(document).ready(function() {
    alert("Test");
});

Its inside a the of a .NET master page. This code fires on some of our computers but not on others. All users have the same version of IE and I also have tested this on Firefox with the same results. All browsers have scripting enabled and stuff like that, at This point I don't know what else could be causing this issue. I am using jQuery version 1.3.2. Of course my real code is more interesting than what I posted, but if I cant get an alert to fire, then what use is the rest :)...

Any help is welcomed.

Thanks

A: 

Please try to use the following code.

$(function(){
    alert("test");
});

PS. Please use jQuery-1.3.2.js and Don't use jQuery-1.3.2-vsdoc.js!

Soul_Master
Thanks... I did try this with the same result. I am not using the vsdoc js file im using the one you suggested.
Majocorro
`$(function(){...});` is simply a (confusing and pointless, IMO) shortcut for `$(document).ready(function(){...});`
thenduks
I know that is the some thing.
Soul_Master
+1  A: 

Try

jQuery(document).ready(function(){
    alert("test");
});

If it doesn't work try adding a console.log(jQuery) for firefox or similar just before and see what that gives you when it fails.

googletorp
A: 

If you are calling a localhost file are you sure all computers have access to the localhost server? Try changing it to

<script type="text/Javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js">&lt;/script>

And see if that works

Psytronic