title: Using jquery-ui in ClojureScript with jayq
body: <p>I'm trying to use jayq with jquery.ui.sortable to make a list on a page
  sortable.  Looking at <a href="http://jqueryui.com/demos/sortable/" rel="nofollow noreferrer">http://jqueryui.com/demos/sortable/</a> it seems like it should be as
  simple as:</p>
  
  <pre><code>(.sortable ($ :#sortable))
  </code></pre>
  
  <p>Which compiles down to:</p>
  
  <pre><code>jayq.core.$.call(null, "\ufdd0'#sortable").sortable();
  </code></pre>
  
  <p>And throws:</p>
  
  <pre><code>Uncaught TypeError: Cannot call method 'call' of undefined
  </code></pre>
  
  <p>when I try to include it in a page.  Interestingly, the generated code
  does work in the page when I paste it into the js console, which implies
  to me that something necessary is loaded after that line is executed.</p>
  
  <p>I've modified</p>
  
  <pre><code>(def cljs-options {:advanced {:externs ["externs/jquery.js"]}})
  </code></pre>
  
  <p>to</p>
  
  <pre><code>(def cljs-options {:advanced {:externs ["externs/jquery.js" "js/ui/jquery-ui.js]}})
  </code></pre>
  
  <p>after reading
  <a href="http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html" rel="nofollow noreferrer">http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html</a>
  , which doesn't seem to be sufficient. I'm guessing that jquery.ui
  modifies the $ Prototype, but I'm not sure how to accomplish this in
  clojurescript</p>
  
  <p>I'm also using noir and noir-cljs, if it makes any difference.</p>
  
  <p>Looking at <a href="https://stackoverflow.com/questions/6134290/using-jqueryui-with-closure-compiler">using jQueryUI with closure compiler</a>  it might just be that jquery-ui needs a hand rolled externs file in order to be used, possibly a major undertaking.  Can anyone confirm?</p>