Quote:
Originally Posted by sunfighter
I really don't know where your coming from Stephen. Why would anyone use window.jQuery? I personally use the $ sign. .
|
So now you are contradicting yourself. You said with global variables you always use window. on the front of the name and now you have contradicted that and said that for the one global variable you need when using JQuery you use $. So in fact you don't use window. on the front of the only global variable that you ought to have when using JQuery.
When using JQuery - jQuery should be the only global JavaScript variable in the page. There is no need to have $ defined as well. After all you only need to reference the global variable twice and one of those is to turn off $.
Code:
jQuery.noConflict();
(function($) {
// your jQuery code goes here
})(jQuery);