title: swipe.js Uncaught TypeError: Object #<HTMLDivElement> has no method 'next'
body: <p>I keep having this error when i try to implement swipe.js</p>
  
  <pre><code>Uncaught TypeError: Object #&lt;HTMLDivElement&gt; has no method 'next' 
  </code></pre>
  
  <p>I am loading content via ajax</p>
  
  <p>jquery:</p>
  
  <pre><code>    var container = $("#wrapper");
  
      url = this.href + " .span9";
  
      container.load(url, function(){
         var $galNav = $("&lt;a href='#' onclick='slider.prev();return false;'&gt;prev&lt;/a&gt; &lt;a href='#' onclick='slider.next();return false;'&gt;next&lt;/a&gt;");
         container.append($galNav);
         window.mySwipe = new Swipe(document.getElementById('slider'));
      });
  </code></pre>
  
  <p>The html I am loading:</p>
  
  <pre><code>&lt;div id='slider'&gt;
    &lt;ul&gt;
      &lt;li style='display:block'&gt;1&lt;/li&gt;
      &lt;li style='display:none'&gt;2&lt;/li&gt;
      &lt;li style='display:none'&gt;3&lt;/li&gt;
      &lt;li style='display:none'&gt;4&lt;/li&gt;
      &lt;li style='display:none'&gt;5&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I followed <a href="http://swipejs.com/" rel="nofollow">swipe.js</a> but I don't get why I am having that error and doesn't work</p>