How to create own jQuery-like function in JavaScript?
<p>How can i create a function which looks like the jquery callback $</p>

<p>Say i want to call a element with id= "mydiv".</p>

<p>i want to be able to call it like </p>

<pre><code>var div = $("mydiv").value;
</code></pre>

<p>i think the function should look like </p>

<pre><code>function $(element)
{
  return  document.getElementById(element);
}
</code></pre>

<p>Is that the right way to do it, or do you prefer another way to solve it?</p>
