Skip to content

Instantly share code, notes, and snippets.

@yedi
Created December 29, 2013 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yedi/8168773 to your computer and use it in GitHub Desktop.
Save yedi/8168773 to your computer and use it in GitHub Desktop.
;; mapping add-class! and remove-class! across these lists don't seem to work
(defn handle-nav [btn div]
(map #(dom/add-class! % :hide) (sel :.nav-section))
(dom/remove-class! div :hide)
(map #(dom/remove-class! % :active) (sel [:.nav :li]))
(dom/add-class! btn :active))
;; the mapped fns here work with the print statement... wtf
(defn handle-nav [btn div]
(print (map #(dom/add-class! % :hide) (sel :.nav-section)))
(dom/remove-class! div :hide)
(print (map #(dom/remove-class! % :active) (sel [:.nav :li])))
(dom/add-class! btn :active))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment