Skip to content

Instantly share code, notes, and snippets.

Forked from ryancrum/jquerytest.cljs
Created January 17, 2012 02:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
How to use jQuery from ClojureScript
(ns jquerytest.core)
(def jquery (js* "$"))
(fn []
(-> (jquery "div.meat")
(.html "This is a test.")
(.append "<div>Look here!</div>"))))
<script type="text/javascript" src="out/goog/base.js"></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="jquerytest.js"></script>
<script type="text/javascript">
<div class="meat">Replace me, jquery.</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment