If you are a JavaScript enthusiast, then you must check my previous post where I have explained it using a different and yet simple technique. Here however, I am sharing a jQuery example that explains ...
HTML5 “data” attributes allow developers to add data to an element. Using “data-” as a prefix, you can add a data attribute to store some information within an element (any element). Now, how do you ...
The difference is very simple. The jQuery .empty() method will clear or remove the contents inside an element, including the child nodes that are nested inside the selected element. Whereas .remove() ...
You can easily create an exploding and imploding effect on your web page using jQuery. The jQuery UI provides simple methods that we can use to create some amazing effects. In this post, I am sharing ...
Let’s assume, I have a number series or a text string and I want to add a dash or hyphen after every 3rd character or simply convert a number like 515458499 to 515-458-499 on my browser. How do I ...
You can use the location.reload() method to reload or refresh an entire web page or just the content inside an element. The .reload() method can be triggered either explicitly (with a button click) or ...
Let us assume, you have a DIV element on your web page and you want to show this element at the mouse click position. How do you do this? I am sharing a simple jQuery code here that shows how easily ...
There are two simple ways you can read data from an external JSON file and convert the data to an Array. I am sharing two examples here. The first example is in JavaScript and uses the ...
Unlike HTML form input controls, there is no “disabled” attribute for the A tag. Therefore, simply adding the “disabled” attribute to the link won’t actually disable it. There is a workaround though ...
You can use jQuery .prop() method to change the properties of an HTML element, dynamically, that is, at runtime. So, let’s see how we can use the .prop() method to disable or enable a select dropdown ...