JSFiddle - React, Tailwind, and code Playground

by Noranterry

HTML

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css">
<script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
<div data-role="page">
     <div data-role="content">
         
         <input type="search" name="search" id="search-basic" value="something" />
         <br /><br /><br />
         <input type="text" name="name" id="basic" value="Text wothout X button"  />
         <span id='X'>X</span>
         
    </div>
</div>

CSS

span {
 pointer: cursor;   
}
#x{ position:relative; left:-20px !important; border:1px solid blue;}

JavaScript

$('#X').click(function(){
   $(this).prev().val("").focus()
})