title: Add methods to function
body: <p>I want to add method to a function such that i can call them in a chain</p>
  
  <p>What i want to do:</p>
  
  <p>If you have used jQuery , then you must have seen the syntax like </p>
  
  <pre><code>$("#ID");
  </code></pre>
  
  <p>returns element</p>
  
  <pre><code>$("#ID").css("property")
  </code></pre>
  
  <p>returns css value of property of element</p>
  
  <p>How can i do it by defining custom methods with same syntax without using jQuery ?</p>