$( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
},
handler: function( event ) {
- var self = this,
+ var that = this,
args = arguments,
target = $( event.target ),
cX, cY, pX, pY;
// is fired asynchronously and the old event is no longer
// usable (#6028)
event.originalEvent = {};
- jQuery.event.handle.apply( self, args );
+ jQuery.event.handle.apply( that, args );
} else {
pX = cX;
pY = cY;
<script>
$.widget( "custom.catcomplete", $.ui.autocomplete, {
_renderMenu: function( ul, items ) {
- var self = this,
+ var that = this,
currentCategory = "";
$.each( items, function( index, item ) {
if ( item.category != currentCategory ) {
ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
currentCategory = item.category;
}
- self._renderItem( ul, item );
+ that._renderItem( ul, item );
});
}
});
(function( $ ) {
$.widget( "ui.combobox", {
_create: function() {
- var self = this,
+ var that = this,
select = this.element.hide(),
selected = select.children( ":selected" ),
value = selected.val() ? selected.text() : "";
},
select: function( event, ui ) {
ui.item.option.selected = true;
- self._trigger( "selected", event, {
+ that._trigger( "selected", event, {
item: ui.item.option
});
},
},
drag: function( el ) {
- var self = this,
- center = this.findCenter(this.target),
+ var center = this.findCenter(this.target),
options = this.options,
x = Math.floor( center.x ),
y = Math.floor( center.y ),
$.widget("ui.drilldown", {
_init: function() {
- var self = this;
+ var that = this;
this.active = this.element.find(">ul").attr("tabindex", 0);
// hide submenus and create indicator icons
// disable built-in key handling
input: $(),
focus: function(event, ui) {
- self.activeItem = ui.item;
+ that.activeItem = ui.item;
},
select: function(event, ui) {
- if (this != self.active[0]) {
+ if (this != that.active[0]) {
return;
}
var nested = $(">ul", ui.item);
if (nested.length) {
- self._open(nested);
+ that._open(nested);
} else {
- self.element.find("h3").text(ui.item.text());
- self.options.select.apply(this, arguments);
+ that.element.find("h3").text(ui.item.text());
+ that.options.select.apply(this, arguments);
}
}
});
primary: "ui-icon-carat-1-w"
}
}).click(function() {
- self.up();
+ that.up();
return false;
}).hide();
},