All jQuery Code Examples

jQuery code to fetch thumbnail of youtube video

In this post, find jQuery code to fetch thumbnail of youtube video. This is very helpful when you are embedding any youtube video to your webpage. Youtube provides an API which can be used to fetch the thumbnail image of the video and not lot of people are aware about this. For the demo purpose, […]
Read the rest of this entry »

jQuery code to disable “Enter” key

Got a strange requirement from my client that whenever the "Enter" key is pressed on the page, the page should not be submitted. It should only be submitted when user clicks the submit button using mouse. Well, this was pretty simple and easy with jQuery. I have implemented it in 2 mins and thought of […]
Read the rest of this entry »

jQuery code to handle broken (not found) images in webpage

In this post, find out jQuery code to handle broken link images or not found images on a webpage. This can happen when path of the image is changed or it is removed or renamed. But this can be answered easily with jQuery. When the image is not loaded properly, use jQuery error event on […]
Read the rest of this entry »

Sort Dropdown list items using jQuery

In this post, find out jQuery code to sort dropdown list items. The items can be sorted by item's text or by item's value in ascending or descending order. Related Post: Common Dropdown operation using jQuery How to Reset DropDown using jQuery How to Disable DropDown List Item using jQuery To sort the items, use […]
Read the rest of this entry »

Convert Text to Links using jQuery

Yesterday for one of my requirement, I needed to convert bold text of the a div element to hyperlink using jQuery. To do this, jQuery provides wrap() method which is used to wrap HTML element around each of the matched elements. Below jQuery code, uses jQuery wrap() method to wrap the bold text to hyperlink. […]
Read the rest of this entry »

How to remove/delete selected item from a dropdown using jQuery

In this post, find jQuery code to remove or delete selected item from a dropdown list using jQuery. $(document).ready(function() { $('#btnDelete').click(function() { $('#ddlList option:selected').remove(); }); });? See result below See Complete Code Feel free to contact me for any help related to jQuery, I will gladly help you.
Read the rest of this entry »

Responsive Menu
Add more content here...