Created
June 10, 2015 07:28
-
-
Save dsapoetra/10a61354b4151c528ba7 to your computer and use it in GitHub Desktop.
domina init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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