Fixed the docs for noConflict, fixed a bug with pager.
authorJohn Resig <jeresig@gmail.com>
Sat, 6 Jan 2007 22:34:12 +0000 (22:34 +0000)
committerJohn Resig <jeresig@gmail.com>
Sat, 6 Jan 2007 22:34:12 +0000 (22:34 +0000)
build/docs/js/pager.js
src/jquery/jquery.js

index 8370bef..44f2e69 100644 (file)
@@ -68,7 +68,9 @@ $.fn.pager = function(step) {
         pager = $("<ul class='nav-page'></ul>");
 
       for ( var i = 0; i < names.length; i++ )
-        $("<a href=''></a>").rel( i ).html( names[i] ).click(function() {
+        $("<a href=''></a>").attr({
+          rel: i, innerHTML: names[i]
+        }).click(function() {
           return handleCrop( this.rel );
         }).wrap("<li></li>").parent().appendTo(pager);
 
index 893a397..3b0f82e 100644 (file)
@@ -1130,28 +1130,32 @@ jQuery.extend({
         * using the 'jQuery' variable. For example, where you used to do
         * $("div p"), you now must do jQuery("div p").
         *
-        * @example $.noConflict();
+        * @example jQuery.noConflict();
+        * // Do something with jQuery
+        * jQuery("div p").hide();
+        * // Do something with another library's $()
+        * $("content").style.display = 'none';
         * @desc Maps the original object that was referenced by $ back to $
         *
-        * @example $.noConflict();
+        * @example jQuery.noConflict();
         * (function($) { 
         *   $(function() {
         *     // more code using $ as alias to jQuery
         *   });
         * })(jQuery);
-        * // other code using $ as an alias to the original implementation (not jQuery)
+        * // other code using $ as an alias to the other library
         * @desc Reverts the $ alias and then creates and executes a
         * function to provide the $ as a jQuery alias inside the functions
         * scope. Inside the function the original $ object is not available.
         * This works well for most plugins that don't rely on any other library.
         * 
         *
-        * @name noConflict
+        * @name $.noConflict
         * @type undefined
         * @cat Core 
         */
        noConflict: function() {
-               if(jQuery._$)
+               if ( jQuery._$ )
                        $ = jQuery._$;
        },