Skip to content

Instantly share code, notes, and snippets.

View joshrhoades's full-sized avatar

Josh Rhoades joshrhoades

View GitHub Profile
@joshrhoades
joshrhoades / classAddRemoveCheck.js
Last active December 16, 2015 16:39 — forked from jelmerdemaat/gist:4107273
Functionality for checking and manipulating classes on DOM Elements (i.e., checking if an element has a class, removing a class from an element, and adding a class to an element. Updated to use better naming conventions, use array joins instead if string concats (operation speed), and boolean returns to more easily be able to tell when functions…
/**
* @file Functionality for checking and manipulating classes on DOM Elements (i.e., checking if an element has a class,
* removing a class from an element, and adding a class to an element. Updated to use better naming conventions,
* use array joins instead if string concats (operation speed), and boolean returns to more easily be able to tell when
* functions performed successfully within an app
* @author Josh Rhoades <http://joshuarhoades.com/>
* @added 04/25/13
* @version 1.0.0
* @see {@link https://gist.github.com/jelmerdemaat/4107273|Original before fork}
* @see {@link http://www.avoid.org/?p=78}