title: Autocomplete using data attribute for source?
body: <p>Can I use data attribute for the source of my autocomplete?</p>
  
  <p>for example</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code> &lt;input type="text" class="autocomplete" data-source="/search.php" /&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>  $(".autocomplete").autocomplete({
          source :  $(this).data('source'),
          minLength:1,
          select: function( event, ui ) {
              console.log( ui.item ?
                  "Selected: " + ui.item.value + " aka " + ui.item.id :
                  "Nothing selected, input was " + this.value );
          }
      });
  </code></pre>
  
  <p>I tried it but it always gives me an error.
  What's wrong with my code?</p>
  
  <p><em><strong><code>Uncaught TypeError: Property 'source' of object #&lt;Object&gt; is not a function</code></em></strong></p>