Search
 
SCRIPT & CODE EXAMPLE
 

HTML

How to change text every 3 seconds

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Change text every 3 seconds</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta https-equiv="X-UA-Compatible" content="ie=edge" />
    <link rel="stylesheet" href="style.css" />
    <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans&display=swap" rel="stylesheet">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  </head>
  <body>
    <div class="row-outer">
      <div class="container">
        <div class="animated-heading">
          <h1>Hi i'm a <span id="words">Ui / UX Design</span></h1>
        </div>
      </div>
    </div>
    <script type="text/javascript">
      (function () {
        var words = ["Ui / UX Design","Photographer","Developer","Youtube","Happy Person" ],
        i = 0;
        setInterval(function(){ $('#words').fadeOut(function(){
            $(this).html(words[(i = (i + 1) % words.length)]).fadeIn();
          }); }, 3000)
      })();
    </script>
  </body>
</html>
Comment

PREVIOUS NEXT
Code Example
Html :: word count alpine js 
Html :: html5 use of section tag in onepage template 
Html :: repeat task multicraft 
Html :: hell 
Html :: write a html code using frames with background color 
Html :: HTML entities must be escaped 
Html :: display pdf in html 
Html :: html select multiple 
Html :: html beautifier 
Html :: html div syntax 
Html :: html personal website template 
Html :: how to put custom tab name in html 
Html :: iframe specific part of a web 
Html :: what is the tag for i frame 
Css :: no select css 
Css :: How to make a backgroud image with no repeat in html 
Css :: button style none 
Css :: html remove border from textarea 
Css :: smooth scroll to anchor 
Css :: text truncate after 3 lines 
Css :: AppDataRoaming pm eact-native.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. 
Css :: swiper center slides but not first slide 
Css :: borders for tables in html/css 
Css :: css hover mouse hand 
Css :: prevent text from going to next line css 
Css :: italic text css 
Css :: css text transform 
Css :: css smooth transition in and out 
Css :: input time without am pm 
Css :: text color as gradient css 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =