title: How to make a function to go after an element
body: <p>In <code>JavaScript</code>, you will often see functions which say <code>document.getElementById("element").someFunction();</code> or <code>$("element").someFunction();</code> instead of <code>someFunction($("element"));</code>. Where <code>someFunction(element)</code> looks a little like the following code.</p>
  
  <pre><code>someFunction(element) {
      //element.doSomething();
  }
  </code></pre>
  
  <p>My question is how do you make a function which manipulates the element it is attached to instead of manipulating an element passed through as an argument?</p>