JSFiddle - React, Tailwind, and code Playground

by matthall

HTML

<ul class="list">
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
</ul>

JavaScript

/*
Using .find() in combination with a single pseudo selector is broken and throws the following error:

results is null: return results.length ? fn( results, argument, not ) : [];

1.8b1: Displays 2, 3, 4, 1
1.8b2: Throws error.
*/

var first = $(".list").find(":first");


$(".list").append(first);