Skip to content

Utility methods for manipulating the className property of HTML elements.

Notifications You must be signed in to change notification settings

sauy7/CssClass.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CssClass.js

Utility methods for manipulating the className property of HTML elements.

The code is a slightly modified version from JavaScript: The Definitive Guide, by David Flanagan. Copyright 2006 O'Reilly Media, Inc., 978-0-596-10199-2.

Modifications from original:

  • Functions only accept Elements, not strings representing an element id
  • The regexp for replacing css classes has been modified to remove duplicates without leaving unwanted whitespace

The Jasmine BDD framework is included in the lib directory. The test runner is a modified example from the standalone download. See the MIT License in the lib directory for details.

The original works in this project are the specifications in spec/CssClassSpec.js for which the following notice applies.

Copyleft 2012 Tim Heighes. Licensed under the WTFPL.

About

Utility methods for manipulating the className property of HTML elements.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published