All jQuery Codes

Things to remember while using jQuery with ASP.NET Master Pages

jQuery is great library but if not used properly then it can make you crazy. If you are using ASP.NET Master Page and planning to use jQuery as well then it is quite important to know few things otherwise your code is not going to work. I have prepared a checklist which you should remember […]
Read the rest of this entry »

How to find index of element in array using jQuery

Today, for my project requirement, I need to find out index of any element in jQuery. I found the solution. jQuery provides a method called "inArray" which search for the specified value in the array and returns the index of the element. Earlier I had posted about jQuery solution to remove item from array, split […]
Read the rest of this entry »

How to find index of Selected element

jQuery provides index() method to find out index of any element. index() method returns an integer value that indicates position of the element. If the element is not found then it returns -1. The index value starts from 0 which means 1st element value will be 0. See below code snippets which finds the index […]
Read the rest of this entry »

How to create clone of any object using jQuery

jQuery provides clone() method which creates deep copy set of all the elements which means it will copy the child nodes also. Clone() method is the best way to duplicate content of any element. For example, I have placed a div and a button. On click of button, we will clone the div and add […]
Read the rest of this entry »

jQuery Code: Change text to Uppercase

Below jQuery code change text to UPPERCASE. $(document).ready(function(){ var strVal = 'jquery by example rocks!!' alert(strVal.toUpperCase()); }); See live Demo and Code I have created a plugin called "Setcase" which can be used to convert text to uppercase, lowercase, title case and pascal case. It starts converting text to case as soon as user starts […]
Read the rest of this entry »

How to Zoom an image using jQuery

You must had seen the zoom in and zoom out functionality for images on many sites. We can very easily achieve the Zoom In and Zoom Out functionality using jQuery toggle method. It is really simple. Let me first tell you the logic behind the implementation. Initially when document is ready then we will set […]
Read the rest of this entry »

Responsive Menu
Add more content here...