JSFiddle - React, Tailwind, and code Playground

by Timmy Willison

HTML

<script src="http://getfirebug.com/firebug-lite-debug.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<xml id="test"></xml>

JavaScript

jQuery(function( $ ) {
/*
 * For jQuery < 1.4.2, this returns the element; 
 * for jQuery >= 1.4.2, it returns null.
 */
console.log( $('#test').length );

// works fine if you pass in the element directly
console.log( $(document.getElementById('test')).length );
});