All jQuery Tips

Fix for “IE Select DropDown with Fixed width issue” using jQuery

Today I found another reason to hate IE. I ran into an issue where Select DropDown with Fixed width cuts off the options text (if it is wider than the assigned width) only in IE (Internet Explorer). In this post, I will show you the fix for this problem using JavaScript and jQuery both. Problem […]
Read the rest of this entry »

How to move items between ListBox using jQuery

In this post, I will show you how you can easily move items from one listbox to another listbox using jQuery. The beauty of this code is that you can also move multiple items together. As you can see from above image that there should be 2 button to move items from one list to […]
Read the rest of this entry »

How to execute jQuery code only after WebPage is loaded completely

One of the advantage of jQuery document.ready() is that it doesn't wait for complete page loading, it starts executing as soon as DOM is loaded. "DOM loading" and "Page Loading" are 2 different terms and don't get confused between these. There is a fundamental difference between these two terms. "DOM loading" means all the DOM […]
Read the rest of this entry »

.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 »

How to Disable DropDown List Item using jQuery

In this post, I will show you how you can disable specific items of the DropDown/ComboBox/Select element using jQuery. To disable any item, just need to add attribute "disabled" with value "disabled" to the list item. //Code Starts $(document).ready(function() { $("#ddlList option[value='jquery']").attr("disabled","disabled"); });? //Code Ends See result below. You can also disable item by their […]
Read the rest of this entry »

Open link in new tab or new popup window using jQuery

Well, do you know that opening a link in new tab and open link in a new popup window are 2 different things? And to implement both the functionality, One need to use different codes. I had never given this a thought before writing this article but I realized that these are 2 different things […]
Read the rest of this entry »

Responsive Menu
Add more content here...