Skip to content

Instantly share code, notes, and snippets.

View sourcebits-robertbiggs's full-sized avatar

Robert Biggs sourcebits-robertbiggs

View GitHub Profile
@sourcebits-robertbiggs
sourcebits-robertbiggs / iz Plugin for jQuery
Created September 20, 2013 16:38
A plugin to normal hasClass is,not and has to work like ChocolateChipJS: hasClass, is, isnt, has and hasnt. This is for implementing support for jQuery with the ChocolateChip-UI framework. With these, the methods will always return the filtered results so that you can perform operations on them directly: $('li').hasClass('selected').css('color',…
$.fn.extend({
hazClass : function ( className ) {
var ret = $();
this.each(function(idx, ctx) {
if ($(ctx).hasClass(className)) {
ret.push(ctx);
}
});
return ret;
},