broke
broke

Reputation: 8312

'jQuery' is undefined

I'm trying to use the Fullscreenr Jquery plugin in my asp.net project. Here is the code on my master page:

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

<script src="Fullscreenr/jquery.fullscreenr.js" type="text/javascript"></script>

<script type="text/javascript">
    var FullscreenrOptions = { width: 907, height: 680, bgID: '#bgimg' };
    jQuery.fn.fullscreenr(FullscreenrOptions);
</script>

It fails on the jQuery.fn.fullscreenr(FullscreenrOptions); line. The full error is :

Microsoft JScript runtime error: 'jQuery' is undefined.

Any ideas?

Upvotes: 2

Views: 6938

Answers (5)

Khan
Khan

Reputation: 516

The path of jquery must be wrong you can try to use another path to test this, like from google. It could be that you need a leading slash or a tilde ~.

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

or

<script src="~/Fullscreenr/jquery-1.3.2.min.js" type="text/javascript"></script>

Upvotes: 1

Adim
Adim

Reputation: 811

Try This: $.fn.fullscreenrResizer (instead of using Jquery, use the "$" symbol)

Upvotes: -3

Jon Adams
Jon Adams

Reputation: 25147

Ensure that the jQuery script is loading via a debugging tool like Firebug, etc. and adjust the src path appropriately if necessary. Check that you don't have any JavaScript errors in the JavaScript console (again, use Firebug or similar). Try the code in other browsers (like Firefox, Chrome, etc--it looks like you're using IE) to see if the behavior is any different.

Upvotes: 0

Matt
Matt

Reputation: 75327

It's most likely that your src path is wrong. Use the network viewer that will be present in the developer tools of your favourite web browser, and check you're not getting a 404 response for the Fullscreenr/jquery-1.3.2.min.js resource.

You might find that the src is missing a leading slash, and in fact should be:

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

Also check the case of the the path, in case your web server is case sensitive.

Upvotes: 6

jmar777
jmar777

Reputation: 39689

That most likely means that your URL for the jQuery source is incorrect. If you look in Firebug/Web Inspector/etc., do you see any 404's?

Upvotes: 2

Related Questions