JSFiddle - React, Tailwind, and code Playground

by jefffabiny

HTML

<p>one</p>
<p class="stop">two</p>
<p>one</p>
<p>two</p>
<p>one</p>
<p>two</p>
<p>one</p>
<p>two</p>
<p>one</p>
<p>two</p>
<p class="test">three</p>
<div class="mouse-over"></div>

JavaScript

index = 1;
$(".test").prevUntil('.stop').each(function(){
    $(this).css('opacity',.000000001);
    if(index != 0){
        index = index - .2;
    }
});