Namespaces

 
1.0.0-SNAPSHOT Arrow_down_16x16
  • (add-class & classes)
Adds the specified classes to the selected element.

1 Example top

  • (add-class "toggable" "hide")
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source net/cgrand/enlive_html.clj:635 top

(defn add-class
 "Adds the specified classes to the selected element." 
 [& classes]
  #(let [classes (into (or (attr-values % :class) #{}) classes)]
     (assoc-in % [:attrs :class] (apply str (interpose \space classes)))))
Vars in net.cgrand.enlive-html/add-class: apply assoc-in defn interpose let str
Used in 0 other vars

Comments top

No comments for add-class. Log in to add a comment.