Skip to content

Commit

Permalink
Tabs: Make sure prototype.url is defined before trying to shim it
Browse files Browse the repository at this point in the history
  • Loading branch information
petersendidit authored and scottgonzalez committed Apr 28, 2011
1 parent 60d4e0a commit a147304
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions ui/jquery.ui.tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand All @@ -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() {
Expand Down Expand Up @@ -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, {
Expand Down

0 comments on commit a147304

Please sign in to comment.