Skip to content

Instantly share code, notes, and snippets.

jQuery.fn['fadeIn'] = function( speed, callback ){
this.show();
if (!!callback) { callback.call(); }
return this;
};
jQuery.fn['fadeOut'] = function( speed, callback ){
this.hide();
if (!!callback) { callback.call(); }
return this;
jasmine.Matchers.prototype.toBeSameJqueryObjectAs = function(expected) {
var error_message = null;
if(!expected || !this.actual || this.actual.length != expected.length) {
error_message = "Expected to have same number of matching elements";
} else {
for(var i = 0; i < expected.length; i++) {
if (this.actual.get(i) != expected.get(i)) {
error_message = "Expected the elements to be the same but were not";
break;
}