Open In App

script.aculo.us tagifyText Effect

Improve
Improve
Like Article
Like
Save
Share
Report

In this article we will demonstrate the effect of tagifyText by using javascript library called script.aculo.us having smooth transition from one to another. We can adjust the duration of the effect as well.

Syntax:

Effect.tagifyText(element);

Note: To use this library we are suppose to install the library and then use it in our programs. And to do so you can follow the this link http://script.aculo.us/downloads.

Demonstration:

To demonstrate the use of this function we have written a small piece of code. In which we have written a small javascript function named ShowEffect method which uses tagifyText method of this library. By clicking on Click me to tagifyText the line!, you will see the effect clearly.

To see the effect first install the library and then open this program in the local environment.




<!DOCTYPE html>
<html>
    <head>
        <title>script.aculo.us examples</title>
  
        <script type = "text/javascript" 
                src = "prototype.js"></script>
        <script type = "text/javascript" 
                src = "scriptaculous.js" ></script>
  
        <script type = "text/javascript">
            function ShowEffect(element){
                new Effect.tagifyText(element);
            }
        </script>
    </head>
  
    <body>
        <div onclick = "ShowEffect('geeks_1')">
            Click me to ShowEffect!
        </div>
        <br />
        <br />
  
        <div id = "geeks_1">
            LINE TO TAGIFYTEXT
        </div>
    </body>
</html>


Output:



Last Updated : 30 Dec, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads