title: What purpose does jQuery's .data() function serve in the Kendo UI?
body: <p>On <a href="http://demos.telerik.com/kendo-ui/web/autocomplete/template.html" rel="nofollow">this website</a>--Kendo UI's Autocomplete widget documentation--there's a piece of code that I only partly understand.</p>
  
  <pre><code>$(document).ready(function() {
  var autocomplete = $("#customers").kendoAutoComplete({
      minLength: 1,
      dataTextField: "ContactName",
      headerTemplate: '&lt;div class="dropdown-header"&gt;' +
              '&lt;span class="k-widget k-header"&gt;Photo&lt;/span&gt;' +
              '&lt;span class="k-widget k-header"&gt;Contact info&lt;/span&gt;' +
          '&lt;/div&gt;',
      template: '&lt;span class="k-state-default"&gt;&lt;img src=\"../../content/web/Customers/#:data.CustomerID#.jpg\" alt=\"#:data.CustomerID#\" /&gt;&lt;/span&gt;' +
                '&lt;span class="k-state-default"&gt;&lt;h3&gt;#: data.ContactName #&lt;/h3&gt;&lt;p&gt;#: data.CompanyName #&lt;/p&gt;&lt;/span&gt;',
      dataSource: {
          transport: {
              read:{
                  dataType: "jsonp",
                  url: "http://demos.telerik.com/kendo-ui/service/Customers"
              }
          }
      },
      height: 370,
  }).data("kendoAutoComplete");
  });
  </code></pre>
  
  <p>Here's what I do understand: this is a standard Autocomplete control that uses templates to make the widget look a little better. I understand how templates work (mostly), and I get that putting it in a .ready() function causes it to be run when the DOM has loaded.</p>
  
  <p>What I don't understand is the need for jQuery's .data() function at the end. Why is it there? I tried to make sense of <a href="https://api.jquery.com/data/" rel="nofollow">the jQuery documentation</a>, but it appears that there's something deeper going on. The variable <code>autocomplete</code> is not used in the rest of this code sample, so I wonder if this is a mistake on Kendo's part.</p>
  
  <p>The .data() function attaches arbitrary data to DOM elements. To what extent does Kendo use this arbitrary data?</p>