Skip to content

Instantly share code, notes, and snippets.

@he9lin
Created December 16, 2009 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save he9lin/257506 to your computer and use it in GitHub Desktop.
Save he9lin/257506 to your computer and use it in GitHub Desktop.
this.headers
this.active.find
this.active.outerHeight()
this.element
this.headers
.attr('role', 'tab')
.next()
.attr('role', 'tabpanel')
$.widget.prototype._setData.apply(this, arguments)
keyCode = $.ui.keyCode
this.headers.index(event.target)
this._clickHandler({target: event.target}, event.target)
typeof selector == "number"
this.headers.filter(":eq("+selector+")")
this.headers.not(this.headers.not(selector))
var o = this.options;
if (o.disabled) return false;
var toHide = this.active.next()
this._toggle(toShow, toHide, data);
toShow = (this.active = $([]));
var clicked = $(event.currentTarget || target);
var clickedIsActive = clicked[0] == this.active[0];
this.running = true
data = {
options: o,
newHeader: clickedIsActive && o.collapsible ? $([]) : clicked,
oldHeader: this.active,
newContent: clickedIsActive && o.collapsible ? $([]) : toShow.find('> *'),
oldContent: toHide.find('> *')
},
self = this
var complete = function() {
if(!self) return;
return self._completed.apply(self, arguments);
};
this.running = toHide.size() === 0 ? toShow.size() : toHide.size(); //num of things to animate
this._trigger('change', null, this.data);
this.toShow.add(this.toHide);
options.toShow.animate({height: "show"}, options);
options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(...)
options.toShow.css("height", "");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment