Skip to content

Instantly share code, notes, and snippets.

Created January 11, 2014 11:18
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 anonymous/8369691 to your computer and use it in GitHub Desktop.
Save anonymous/8369691 to your computer and use it in GitHub Desktop.
How would I go about listening out for links clicked with enfocus?
(defn start []
(ef/at ["#top-menu"] (ef/content "Menu here"))
(ef/prepend ["#top-menu"] (ef/content "Registration"))
(em/at "#user-registration-block " (ev/listen :click
#(ef/at (.-currentTarget %)
(ef/content "Replace with registration form."))))
(ef/at ["#shell"]
(ef/content "<form id=\"post-form\">
<input type=\"text\" class=\"post-box\"
placeholder=\"Cast your thoughts to the universe!\">
</form>")))
(def login "<a href=\"/login\">Login</a> or <a href=\"signup\">Sign Up</a>")
...
<div id="user-registration-block" class="large-4 columns">
User
</div>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment