diff --git a/src/dom/dom.js b/src/dom/dom.js index bc047dc..9870c52 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -756,8 +756,24 @@ Element.Methods = { /** * Element.addClassName(@element, className) -> Element + * - className (String): The class name to add. * - * Adds a CSS class to `element`. + * Adds the given CSS class to `element`. + * + * ##### Example + * + * Assuming this HTML: + * + * language: html + *
+ * + * Then: + * + * $('mutsu').className; + * // -> 'apple fruit' + * $('mutsu').addClassName('food'); + * $('mutsu').className; + * // -> 'apple fruit food' **/ addClassName: function(element, className) { if (!(element = $(element))) return;