All jQuery Code Examples

What happens to event when you clone element using jQuery

jQuery has a method called "clone()". As the name suggests, it creates a exact copy of the element. The .clone() method performs a deep copy of the set of matched elements, meaning that it copies the matched elements as well as all of their descendant elements and text nodes. As for example, I have defined […]
Read the rest of this entry »

How to loop through all grid view rows using jQuery

In this post, I will show you that how can you loop through individual rows of ASP.NET GridView using jQuery. You might be knowing that GridView is rendered as table > th > tr > td format. The columns names are placed in th tag and all the data goes into various td tags. So […]
Read the rest of this entry »

How to redirect user to another web page using jQuery

Simple jQuery code to redirect user to another web page. To redirect, need to use location object available in JavaScript. Earlier I had posted about Redirect to another page after X seconds wait, Different ways to refresh or reload page using jQuery, Get URL Parameters using jQuery and How to force browser to reload the […]
Read the rest of this entry »

Show loading icon while actual image is loading using jQuery

Showing loading for ajax content is pretty common thing but suppose there is a quite big image (in size) on your page and it is taking lots of time to load. Would it not be nice to show loading icon for the same? Well, it creates a nice user experience. The user will come to […]
Read the rest of this entry »

How to get Page Title and URL using jQuery

Yesterday for one of my requirement, I need to get the title and URL of the page. This can be easily done with jQuery. In this post, I will show you a jQuery code snippets which will get the URL and Title of the page using jQuery. $(document).ready(function () { var vhref = $(location).attr('href'); var […]
Read the rest of this entry »

How to substring in jQuery

Well, Substring is not a unknown term for all of us. Substring means to take out some part from the string. And to do Substring with jQuery, you don't have to do anything specific with jQuery. It can be done with two Javascript functions substr() and substring() which can be easily used in jQuery. We […]
Read the rest of this entry »

Responsive Menu
Add more content here...