]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Make sure prototype.url is defined before trying to shim it
authorDavid Petersen <public@petersendidit.com>
Thu, 28 Apr 2011 13:07:54 +0000 (09:07 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 28 Apr 2011 13:07:54 +0000 (09:07 -0400)
ui/jquery.ui.tabs.js

index 82d3f186db057dd35a571984511de2f55a026fc6..d4ee9984f4d8906ea6c76995c7fb20d71cfc4770 100755 (executable)
@@ -628,6 +628,14 @@ $.extend( $.ui.tabs, {
 
 // DEPRECATED
 if ( $.uiBackCompat !== false ) {
+
+       // url method
+       (function( $, prototype ) {
+               prototype.url = function( index, url ) {
+                       this.anchors.eq( index ).attr( "href", url );
+               };
+       }( jQuery, jQuery.ui.tabs.prototype ) );
+
        // ajaxOptions and cache options
        (function( $, prototype ) {
                $.extend( prototype.options, {
@@ -638,7 +646,7 @@ if ( $.uiBackCompat !== false ) {
                var _create = prototype._create,
                        _setOption = prototype._setOption,
                        _destroy = prototype._destroy,
-                       oldurl = prototype._url;
+                       oldurl = prototype.url || $.noop;
 
                $.extend( prototype, {
                        _create: function() {
@@ -864,13 +872,6 @@ if ( $.uiBackCompat !== false ) {
                };
        }( jQuery, jQuery.ui.tabs.prototype ) );
 
-       // url method
-       (function( $, prototype ) {
-               prototype.url = function( index, url ) {
-                       this.anchors.eq( index ).attr( "href", url );
-               };
-       }( jQuery, jQuery.ui.tabs.prototype ) );
-
        // panel ids (idPrefix option + title attribute)
        (function( $, prototype ) {
                $.extend( prototype.options, {