JSFiddle - React, Tailwind, and code Playground

HTML

<a class="someElement">DOUBLE CLICK ME IF YOU LOVE ME</a>

<p>

</p>

JavaScript

var timeoutTarget;
var clickCount = 0;
$('.someElement').click(function(e){
    e.preventDefault();
    clickCount++;
    if(clickCount > 1)
    		clearTimeout(timeoutTarget);
    setTimeout(function(){
        if(clickCount == 1) {
            $('p').text('NEVER LEAVE ME HONEY');
        }
        if(clickCount > 1) {
            $('p').text('BABY YOU DO LOVE ME!');
        }
        clickCount = 0;
    }, 300); // The amount of time you think you can give between clicks
});