Select Page

Category: JavaScript

Posts that are JavaScript-oriented.

How to allow only numeric digits in an input field?

How to allow only numeric digits in an input field?

Allowing only numeric digits in an input field can be useful in many web development projects, especially when working with forms and data input. HTML and JavaScript can be used to achieve this task easily. Here is the HTML code to create a simple input field:...
Responsive text with respect to container width

Responsive text with respect to container width

I used fitty to create responsive text that fits inside it’s parent container perfectly. Fitty Scales up (or down) text so it fits perfectly to its parent container. Ideal for flexible and responsive websites. Here is the demo. DEMO See the Pen SVG Icons –...

How to know the length of the path in SVG?

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