Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

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

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages