All jQuery Interview Question

.empty() vs .remove() vs .detach() – jQuery

Do you know that jQuery provides various methods to remove elements from DOM? These methods are .empty(), .remove() and .detach(). And in this post, I will show you how these methods (.empty vs .remove vs .detach) are different from each other. .empty(): This method removes all the child element of the matched element where remove() […]
Read the rest of this entry »

Difference between sorting string array and numerical array in jQuery

To sort any array, there is a predefined method called "sort" which sorts the array. sort() method sorts the string array in alphabetical order. This method sorts on the basis of the Unicode code points, so it is better to have all uniform names. That is, they must begin with either uppercase or lowercase, but […]
Read the rest of this entry »

Avoid jQuery.Post(), use jQuery.ajax()

Well, as you are aware that there are many ways to make an ajax call. If you don't know then do read "How to Make jQuery AJAX calls". Okay, hope you have gone through the article. So 2 very common ways are jQuery.Post() and jQuery.get().jQuery post() is for to make a post request and jQuery […]
Read the rest of this entry »

Tips to use jQuery selectors efficiently

It is pretty important to understand how to write efficient element selection statement. One has to be very careful while jquery selector statement. Below are some tips on how to use your jQuery selectors efficiently. 1. Always try to use ID as selector You can use ID as selector in jQuery. See below jQuery code. […]
Read the rest of this entry »

Run JavaScript only after page is completely loaded

Before we got into the actual problem it is important to know and understand the fundamental difference between DOM loading and Page Loading. When we say DOM loading that means all the DOM elements are completely loaded but it is quite possible that some of the elements like images are not loaded completely. When we […]
Read the rest of this entry »

Mostly asked jQuery interview questions list

jQuery is rocking and it has become so popular that it is used almost by every developer. As it has already become more popular, interviewers tend to ask jQuery questions in interview. Below is the list of questions which are asked in almost every jQuery interview. Before you go further, please read my previous article […]
Read the rest of this entry »

Responsive Menu
Add more content here...