Tag: JavaScript
Misc
Textareas are commonly used in web forms to allow users to enter multi-line text input. By default, textareas allow users to enter any character they want, including letters, numbers, symbols, and line breaks. However, in some cases, you may want to restrict the input...
Misc
We can create an HTML hidden template using the following method that we can add anywhere in the page. After creating a template we can now use it, modify it, and append/prepend it’s html anywhere in the page. <script id=”imageTemplate”...
JavaScript
You just need to add follwing script to the if else statement in JavaScript to know that the loaded page URL has the given string. You can use it anywhere in head or body tag, on or without document load. <script> if (...
JavaScript
How to know the length of the path in SVG to animate it with the stroke offset method? Well, the answer is very simple. Just use the following JavaScript and update its selector to that of the path you want to calculate the length of. Check the length value in the...
CSS Animations
Created this cool-looking ripple effect animation on the button. It can be implemented on any other element other than buttons. The expanding ripple / circular shape follows mouse/pointer movement during the mouseenter and mouseleave event. The supporting script is in...