Skip to content

Instantly share code, notes, and snippets.

View gnarf's full-sized avatar

Mx Corey Frang gnarf

View GitHub Profile
@gnarf
gnarf / gist:951480
Created May 2, 2011 11:37
widget show/hide function
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
options = options || {};
var hasOptions = !$.isEmptyObject( options ),
effectName = options.effect || defaultEffect;
options.complete = callback;
if (options.delay) {
element.delay( options.delay );
}
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
@gnarf
gnarf / gist:842425
Created February 24, 2011 16:46 — forked from dtolj/gist:842417
$(document).ready(function(){
function rem(e){
alert("asdfasdf");
};
$("#remove").click(rem);
});