Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

dom/add-class and dom/remove-class take multiple classes #18

Open
wants to merge 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 27, 2011
  1. dom/add-class and dom/remove-class accept multiple classes

    Takahiro Hozumi authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/pinot/dom.cljs
View
8 src/pinot/dom.cljs
@@ -67,14 +67,14 @@
elem)]
(gclass/has elem cls)))
-(defn add-class [elem cls]
+(defn add-class [elem & clses]
(doseq [el (pclj/->coll elem)]
- (gclass/add el cls))
+ (apply gclass/add el clses))
elem)
-(defn remove-class [elem cls]
+(defn remove-class [elem & clses]
(doseq [el (pclj/->coll elem)]
- (gclass/remove el cls))
+ (apply gclass/remove el clses))
elem)
(defn toggle-class [elem cls]
Something went wrong with that request. Please try again.