On Fri, May 9, 2008 at 10:21 AM, Fred P <[EMAIL PROTECTED]> wrote:

>
> A little more specific:
>
> You're using jQuery.noConflict() which allows you to use the variable
> jQuery


Pardon me for being a little pedantic: jQuery.noConflict does not allow you
to use the variable jQuery. The jQuery variable is there either way. If not,
you couldn't call jQuery.noConflict() ;)

jQuery.noConflict allows you to use the $ alias for something other than
jQuery, by returning it to its previously defined value.

Another option should be mentioned (for completeness). If you have a bunch
of javascript/jQuery code that's already written to use the $, and you don't
want to search and replace the $ with jQuery, you can use the following
pattern to have the $ alias be jQuery inside a block with all your jQuery
code, after calling jQuery.noConflict:

(function($) {
  // Inside this block, $ is the jQuery object
  // not the other $
})(jQuery);

- Richard

Reply via email to