Press "Enter" to skip to content

Spoiler blur in JavaScript

If you ever want to hide information from the user so they do not get spoiler, then this is the best library in JavaScript.

It allows you to hide the block of text and users will be only be able to view it if they click on it.

It simple.

Then somewhere after above script in your page. Do this.

Now it will blur all the contents inside tags that has class “spoiler”. Users will be able to see if they click upon it.

For demo and more ellaboration, please visit this link.

Everything is awesome.

 

One Comment

Leave a Reply

Your email address will not be published.