java Script User Define $ function like jquery
<p>I'm trying to Create user define $ function as i cannot use Jquery in existing project.</p>

<p>I want to get this function as work as Jquery $('ID')</p>

<p>Please give me some hint Any hint OR Example
for Example</p>

<pre><code>function $(element) {

}

var value = $('elementID').value
</code></pre>

<p><strong>UPDATE:</strong>
As i have prototype.js</p>

<pre><code>function $(element) {
  if (arguments.length &gt; 1) {
    for (var i = 0, elements = [], length = arguments.length; i &lt; length; i++)
      elements.push($(arguments[i]));
    return elements;
  }
  if (Object.isString(element))
    element = document.getElementById(element);
  return Element.extend(element);
}
</code></pre>
