Test case details

Preparation Code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"> </script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> </script> <p id="foo">   Test </p>
window._2 = function(id) {       return jQuery(document.getElementById(id));     }

Test cases

Test #1

$(document.getElementById('foo'));

Test #2

$('#foo');

Test #3

function _(id) {   return jQuery(document.getElementById(id)); } _('foo');

Test #4

_2('foo');

Test #5

document.querySelector('#foo');