All jQuery Tips

Open link on mouseover using jQuery

In today's short post, you will see how to open a link in new window on mouseover or when user takes the mouse on the link. All you need to do is to replace the click event with mousever event. Below jQuery code assign mouseover event to all the element which have ".hoveropen" as css […]
Read the rest of this entry »

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 »

Find Scroll Height for elements using jQuery

.Height() method in jQuery returns height of the element but assume an element which has "overflow:auto" property set (you will find scroll bars) and its content are going beyond to the initially defined height. So in such case, jQuery .Height() method will not give you the scroll height. One need to use scrollHeight property to […]
Read the rest of this entry »

Load CSS files using jQuery

Today I got into a situation where I need to load CSS file dynamically using jQuery. My code was working in all the browsers except IE. But after spending couple of minute I was able to make proper cross browser solution. Here is a piece of code that will load CSS using jQuery. $(document).ready(function(){ $("head").append("<link>"); […]
Read the rest of this entry »

Easy Tip to write clean and manageable jQuery Code

jQuery gives amazing power to make things simple and easy to implement. For jQuery to work, we need to put all the code in $(document).ready() function and there can be many $(document).ready() function in a single page. But putting everything inside $(document).ready() function may make your code look ugly, not understandable, unmanageable and sometimes buggy. […]
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 »

Responsive Menu
Add more content here...