All jQuery Tips

Detect IE11 using JavaScript/jQuery

In this post, find JavaScript/jQuery code to detect IE 11. Your old code detect IE browser either using navigator.userAgent or $.browser.msie will not work for IE 11 as the User Agent string for IE 11 is changed. Previously I had posted about Detect Browsers using jQuery, but with the release of jQuery 1.9 $.browser feature […]
Read the rest of this entry »

How to restore CSS styles using jQuery

To assign inline css to any DOM element, we can jQuery ".css()" method to define it. Like, $("#dvText").css('color','#FF0000'); And if you need to remove the color again, then you can use the same css method to remove it. Like, $("#dvText").css('color',''); The above method to remove/restore the style is fine, when you have defined a single […]
Read the rest of this entry »

jQuery – Correct way to check if object is null or Empty

Yesterday, I ran into a interesting and frustrating situation where for couple of minutes I was not able to find out what's wrong with my code. But I learned something new. Let me first give you an idea about what I was working on. I was creating a function, which first checks of div element […]
Read the rest of this entry »

jQuery code not working – A Daily Battle

Developers life is full of various code battles and "jQuery is not working" or "jQuery code is not working" is a just another daily battle which they have to fight against while working with jQuery. The message "jQuery is not working" itself defines its pain saying "Oh!!! there is something buggy in your code and […]
Read the rest of this entry »

jQuery – Page Redirect after X seconds wait

You must have come across any website which uses a webpage with some annoying advertisement and a message that says "You will be redirected to actual page after X seconds". This can be easily implemented with jQuery. In this post, find jQuery code to redirect user to another webpage after specific time interval or few […]
Read the rest of this entry »

Difference Between jQuery().each() and jQuery.each()

jQuery has 2 different methods jQuery().each() (Also written as "$.each()") and jQuery.each(). Both the methods are similar in nature used for iteration or looping but the differ only at the level where they are used. jQuery.each(): is used to iterate, exclusively, over a jQuery object. When called it iterates over the DOM elements that are […]
Read the rest of this entry »

Responsive Menu
Add more content here...