Here I will explain how to expand or increase textbox size on focus using JQuery in asp.net.
In previous article I explained disable right click on image using JQuery and many articles relating to JQuery. Now I will explain how to expand or increase textbox size on focus using JQuery in asp.net.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jquery expand textbox on focus using asp.net</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script type="text/javascript" language="javascript">
$(document).ready(function()
{
$('#txtUserName').width(150);
$('#txtUserName').focus(function() {
$(this).animate({
width: 250,
height:20
})
.delay(100)
});
$('#txtUserName').blur(function() {
$(this).animate({
width: 150,
height:15
})
.delay(100)
});
});
</script>
</head>
<body>
<form id="form1"
runat="server">
<div><b>Search:</b>
<asp:TextBox ID="txtUserName"
runat="server"
/>
</div>
</form>
</body>
</html>
|
Search:
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
Subscribe by RSS
Subscribe by Email
1 comments :
nice post...:)