All jQuery Code Examples

Copy text from one textbox to another textbox while typing

You may have seen on websites when as you type in one textbox, the same text gets copied to another textbox. In this short post, you will learn how can you implement the same functionality using jQuery. All one need to do is to bind keyup event on textbox and then copy textbox value to […]
Read the rest of this entry »

How to disable/enable an element with jQuery

You must have come across a situation where you have to make any element disable or enable. With jQuery, there are couple of ways using them you can enable/disable any element. jQuery really makes your task very easy. In below given example, I have disabled a textbox with id "txtName". Approach 1 $("#txtName").attr("disabled", true); Approach […]
Read the rest of this entry »

Add Hyperlink to images using jQuery

To Add Hyperlink to the image, we normally use <a> tag that contains image tag to show the image. But assume there are 100 images and you need to add hyperlink to every image. Putting 100 <a> tag with each image is time consuming and painful. But jQuery can make your task painless. So in […]
Read the rest of this entry »

CSS Class, Attribute, Property and jQuery

In this short post, I will show you how to add/remove attributes or properties to DOM elements and how to add/remove CSS classes from DOM elements using jQuery. Also, how attribute and properties are different in jQuery. Before jQuery 1.6 there was no concept of property. Everything was treated as attributes. But now you must […]
Read the rest of this entry »

Check if radio button is checked or selected using jQuery

Yesterday I need to find out if radio button is checked/selected or not using jQuery. I was knowing one way to find out but there are couple of other ways as well to find out if radio button is checked using jQuery. In this post, you will find all different possible ways. 1. First Way: […]
Read the rest of this entry »

Get URL Parameters using jQuery

In today's post, you will see small piece of code but really effective and useful. That is how to get URL Parameters using jQuery. Now days every server language provide direct method to get the URL parameters but this is not straight forward with jQuery. Earlier I had posted about Get Page Title and URL […]
Read the rest of this entry »

Responsive Menu
Add more content here...