function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
To collect a group of elements, we pass the selector to the jQuery function using…
jQuery is a lightweight, "write less, do more", JavaScript library. The purpose of jQuery is…
HTML:- [crayon-68b5acd64e0e8938479735/] CSS:- [crayon-68b5acd64e0ed275464830/] JavaScript:- [crayon-68b5acd64e0f0242877054/]
Prevent users typing special characters in text box, textarea, etc. [crayon-68b5acd64e21b677504153/] ^[a-zA-Z]+$ Alphabets ^[a-zA-Z\s]+$ Alphabets…
Any interactive web site has form input - a place where the users input different…
[crayon-68b5acd64e53b284279654/]