You can use the “onfocus” attribute in JavaScript to clear a textbox or an input box when somebody sets focus on the field. If you are using jQuery, then use the “.focus()” method to clear the field. ...
We can use jQuery .prop() method to change the set or get the properties of an element. When I say set, it means change one or property (or value) of an element. The term get indicates return a ...
You can use the width() method in jQuery for horizontal measurement of an element such as a DIV. The width() method excludes padding, margin or border of the element. Whereas, the outerWidth() method ...
If you are using the jQueryUI AutoComplete widget in your application, then I am you sure might have come across the need to highlight the letters or the words that you type in the textbox. Its simple ...
There are few easy ways to get the selected text of a SELECT dropdown list dynamically using JavaScript and jQuery. The selected text of a SELECT element may be different (or similar) from the value ...
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 ...
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 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 ...
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 ...