Skip to content

Instantly share code, notes, and snippets.

@dsapoetra
Created June 10, 2015 07:28
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 dsapoetra/10a61354b4151c528ba7 to your computer and use it in GitHub Desktop.
Save dsapoetra/10a61354b4151c528ba7 to your computer and use it in GitHub Desktop.
domina init
(defn html1 []
;;(dom/destroy! (dom/by-id "content"))
(dom/set-inner-html! (dom/by-id "idofhtml")
"<h1> lorem ipsum </h1>"))
(defn ^:export init []
(when (and js/document
(.-getElementById js/document))
(ev/listen! (dom/by-id "link1") :click html1)
(ev/listen! (dom/by-id "link2") :click html2)
(ev/listen! (dom/by-id "link3") :click html3)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment