-
-
Save anonymous/dc59408990ebbf17f2d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<HTML> | |
<HEAD> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> | |
<script type="text/javascript" src="jquery.clearable.js"></script> | |
<link rel="stylesheet" href="jquery.clearable.css" type="text/css" media="screen" /> | |
<script> | |
$(document).ready(function(){ | |
$("#search").on("keyup", function() { | |
if ($(this).val().length > 0){ | |
$('.divclearable').show(); | |
$('#search').clearable(); | |
} | |
else{ | |
$('.divclearable').hide(); | |
} | |
}); | |
}); | |
</script> | |
<TITLE>Clearable Textboxes in jQuery</TITLE> | |
<STYLE> | |
body, input{ | |
font-family: Calibri, Arial; | |
margin: 0px; | |
padding: 0px; | |
} | |
input { | |
font-size: 15px; | |
} | |
.style1 { | |
border: 3px solid #ffaa00; | |
font-size: 20px; | |
} | |
</STYLE> | |
</HEAD> | |
<BODY> | |
<div id="container"> | |
<div id="header"> | |
<H2>Clearable Textboxes in jQuery</H2> | |
</div> | |
<div id="content"> | |
<br/> | |
<input type="text" class="clearable style1" size="30" id="search" /> | |
</div> | |
</div> | |
</BODY> | |
</HTML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<HTML> | |
<HEAD> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> | |
<script type="text/javascript" src="jquery.clearable.js"></script> | |
<link rel="stylesheet" href="jquery.clearable.css" type="text/css" media="screen" /> | |
<script> | |
$(document).ready(function(){ | |
$("#search").on("keyup", function() { | |
if ($('#search').val().length != 0){ | |
$('#search').clearable(); | |
$('.divclearable').show(); | |
} | |
else{ | |
$('.divclearable').hide(); | |
} | |
} | |
}); | |
</script> | |
<SCRIPT> | |
$(document).ready(function() { | |
//$('.clearable').clearable() | |
}); | |
</SCRIPT> | |
<TITLE>Clearable Textboxes in jQuery</TITLE> | |
<STYLE> | |
body, input{ | |
font-family: Calibri, Arial; | |
margin: 0px; | |
padding: 0px; | |
} | |
input { | |
font-size: 15px; | |
} | |
.style1 { | |
border: 3px solid #ffaa00; | |
font-size: 20px; | |
} | |
</STYLE> | |
</HEAD> | |
<BODY> | |
<div id="container"> | |
<div id="header"> | |
<H2>Clearable Textboxes in jQuery</H2> | |
</div> | |
<div id="content"> | |
<br/> | |
<input type="text" class="clearable style1" size="30" id="search"></input> | |
</div> | |
</div> | |
</BODY> | |
</HTML> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment