I went through this html fragment, and to my surprise, a jQuery object is being created!
<!doctype html> <body> <h1>Hello World</h1> </body> </html> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
As you can see, the <script> appears after closing the </html> . I wonder how and why it works?
Curiousmind
source share