JSFiddle - React, Tailwind, and code Playground

by nosfan1019

HTML

<div>
                <input class="first" type="text">
            </div>


<input type="text"> <a href="#" class="asdf">working</a>

<p class="lll">hello</p>

CSS

body {
    margin: 50px;
}



input {
    margin: 20px 0;
}

JavaScript

$('input.first').blur(function () {      
        if ($(this).val().length > 0 ) {  
           $(this).parent().append('<a href="#" class="asdf">not working</a>');            
        }            

    });



    $('body').on('click', '.asdf', function () {
        console.log('aaa');                
        $(this).css('color','red');
        $(this).text('hhhhhh');
        $(this).closest('body').find('.lll').css('color','green');
        $(this).addClass('boo');            
    });