All jQuery Codes

Determine which key was pressed using jQuery

I had a requirement where I need to check which key was pressed by the User in the textbox and then take various action. So below is simple jQuery code to determine or find out which key was pressed. We are using keypress() event of jQuery to detect which key was pressed. <input type='text' id='txtValue' […]
Read the rest of this entry »

Useful jQuery code examples for ASP.NET Controls

Earlier I had posted about Using jQuery with ASP.NET and in this post, you will find list of some useful jQuery code example for ASP.NET controls that we use on daily basis. One thing, while creating object of any ASP.NET control, always use ClientID. As when Master pages are used then the ID of the […]
Read the rest of this entry »

jQuery code to allow numbers and arrow keys in textbox

I have already posted about "jQuery code to allow only numbers in textbox", but one of my reader asked me to allow arrow keys as well. I have modified the code slightly to allow arrow keys. I thought it's good idea to share with all my readers. See below jQuery code. $(document).ready(function(){ $("#txtNumbers").keydown(function(event) { if(event.shiftKey) […]
Read the rest of this entry »

How to Zoom image on mouseover using jQuery

I had already posted about Zoom an image using jQuery but that is on click event of the button. One of my reader asked me how to zoom an image with out a click, simply when mouse is on image. This is not a tough task to do. jQuery provides 2 events mouseover() and mouseout() […]
Read the rest of this entry »

jQuery empty() vs remove()

jQuery provides 2 methods empty() and remove() to remove the elements from DOM. I have seen the programmers getting confused between both the methods. empty() method removes all the child element of the matched element where remove() method removes set of matched elements from DOM. Confused? Let me explain you with an example. There are […]
Read the rest of this entry »

Show plain text as watermark for password text box using jQuery

There are plenty of jQuery plugins available to show watermark for textbox. But none of these plugin when used for password type textbox will show the watermark in plain text. It will be displayed in asterisk signs. See below image. But I needed to show watermark for password text box as plain text. After some […]
Read the rest of this entry »

Responsive Menu
Add more content here...