JSFiddle - React, Tailwind, and code Playground

by atif_kht

HTML

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Login Box HTML Code - www.PSDGraphics.com</title>

        <link href="login-box.css" rel="stylesheet" type="text/css" />
    </head>

    <body>


        <div style="padding: 100px 0 0 250px;">


            <div id="login-box">

                <H2>Login</H2>
                Lorem Ipsum is simply dummy text of the printing and typesetting industry.
                <br />
                <br />
                <div id="login-box-name" style="margin-top:20px;">Email:</div>
                <div id="login-box-field" style="margin-top:20px;">
                    <input name="q" class="form-login" title="Username" value="" 
                           size="30" maxlength="2048" />
                </div>
                <div id="login-box-name">Password:</div>
                <div id="login-box-field">
                    <input name="q" type="password" class="form-login" title="Password" 
                           value="" size="30" maxlength="2048" />
                </div>
                <br />
                <span class="login-box-options"><input type="checkbox" name="1" 
                                                       value="1"> Remember Me 
                    <a href="#" style="margin-left:30px;">Forgot password?</a>
                </span>
                <br />
                <br />
                <a href="#"><img src="images/login-btn.png" width="103" height="42" 
                                 style="margin-left:90px;" />
                </a>

            </div>

        </div>

    </body>
</html>

CSS

body {
    cursor: pointer;
}

JavaScript

$(document).ready(function(){
    $(document).click(function(event){
        //alert($(event.target).html());
        var clicked_content = $(event.target).html();
        
        if($(clicked_content).find('*').length > 0){
            alert(clicked_content);
        }else{
            alert(clicked_content);
        }
    }); 
});