2

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?

2
  • are you mixing and matching jquery versions? Commented Sep 6, 2011 at 15:55
  • 2
    is jQuery actually located at src="Fullscreenr/jquery-1.3.2.min.js" as your code sample shows? Commented Sep 6, 2011 at 15:56

5 Answers 5

6

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Putting in the leading slash fixed the problem. The weird thing is that I dragged and dropped the jquery file in the code within visual studio. You would think visual studio would know the correct path...
@broke: WYSIWYG editors only do what they're told. Without a leading / is a relative path and with a leading / is an absolute path. It's up to you to tell the editor whether to use relative or absolute by default.
2

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?

Comments

1

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>

Comments

0

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.

Comments

-3

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

2 Comments

$ will not be defined if jQuery isnt. $ is set equal to jQuery in the jQuery source.
If jQuery isn't defined, how could $ be?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.