How to Create a Flashing Text Effect using jQuery ? Last Updated : 06 Jul, 2021 Comments Improve Suggest changes Like Article Like Report In this article, we are going to create a flashing text using jQuery. It is basically, a text which is visible then it goes invisible, and again it comes back to its original visibility and this process is continued repeatedly, then it is called flashing text. With jQuery, it is very simple to create blinking or flashing text. There are some built-in methods available in jquery which we will use to create flashing text. We have a jQuery method fadeOut() to convert a visible element into a hidden element and another method fadeIn() to convert a hidden element to visible. Fadein effect: We have to mark display: none on every element using CSS, to show the working of fadeIn() method. HTML <!DOCTYPE html> <html lang="en"> <head> <!-- Using jquery library --> <script src= "https://code.jquery.com/jquery-git.js"> </script> <style> p { color: red; font-size: 40px; display: none; } </style> </head> <body> <p id="a">Hello</p> <p id="b">Hello</p> <p id="c">Hello</p> <script> // Fast fade in $("#a").fadeIn("fast") // Slow fade in $("#b").fadeIn("slow") // Fade in in 4s $("#c").fadeIn(4000) </script> </body> </html> Output: Fadeout: The following example demonstrates the jQuery fadeOut() method. HTML <!DOCTYPE html> <html lang="en"> <head> <!-- Using jquery library --> <script src= "https://code.jquery.com/jquery-git.js"> </script> <style> p { color:blue; font-size: 40px; } </style> </head> <body> <p id="a">Hello</p> <p id="b">Hello</p> <p id="c">Hello</p> <script> // Fade out in 4s $("#a").fadeOut(1500) // Slow fade out $("#b").fadeOut("slow") // Fast fade out $("#c").fadeOut("fast") </script> </body> </html> Output: Final Code: When both the above methods are used together, the result will be a flashing text. But the problem with the above code is that the text will blink only once. So to do this process repeatedly, we can use the jQuery setInterval() function. HTML <!DOCTYPE html> <html lang="en"> <head> <!-- Using jquery library --> <script src= "https://code.jquery.com/jquery-git.js"> </script> <style> p { color: blue; font-size: 40px; } </style> </head> <body> <p id="a">Hello</p> <script> setInterval(function () { $("#a").fadeOut(200) $("#a").fadeIn(200) },100) </script> </body> </html> Output: Comment More infoAdvertise with us Next Article How to Create a Flashing Text Effect using jQuery ? H hrtkdwd Follow Improve Article Tags : Web Technologies JQuery jQuery-Effects jQuery-Methods jQuery-Questions +1 More Similar Reads How to Create Liquid Filling Effect on Text using HTML and CSS ? The liquid fill text animation can be done using CSS | ::before selector. We will use key frames to set height for each frame of animation. Please make sure you know about both CSS | ::before selector and CSS | @keyframes Rule before try this code.The basic styling of the text can be done differentl 3 min read How to create a marquee effect using CSS ? In this article, we will be creating the marquee effect by using HTML and CSS. This effect can be created by using the <marquee> tag in HTML, but we will not use this tag as it is not widely used nowadays. We will create and design a marquee effect by using the CSS classes and styling properti 2 min read How to Create Engraved Text Effect using HTML and CSS ? The engraved text effect is an effect that you can use in your websites as a heading or a sub-heading to make it look more pleasing and attractive. Approach: The engraved text effect can be easily generated using HTML and CSS. First we will create a basic text using HTML and then by using the CSS te 2 min read How To Create Carved Text Effect using CSS? The carved text effect is also known as the embossed effect as it looks like the text has been embossed on a background. It is also known as Neumorphism in CSS. This effect is used when we want to give our website a clean and refreshing look. The embedded text can be of the same color as the backgro 2 min read How to Create Text Animation Effect using JavaScript ? Creating text animations in JavaScript can add an extra layer of interactivity and engagement to a website or application. By using JavaScript, we can create text that moves, fades, changes color, or transforms in other ways. Animating text can also help convey important information or messages in a 2 min read Like