javascript - How can i change the contents of HTML dynamically -


I have some messages to appear on every specific set of 10 seconds. But I am currently able to show only one message. How the remaining messages will be shown after the interval .. This is the code.

    

According to my current code, I am able to display the first message, but how to show others like v2, v3. Please help me ..

Create an array with all your messages, and set interval function.

You can see the sample in this Bela:

  var v = {}; V [0] = "Your text 
Hello"; V [1] = "your text2
Hello2"; V [2] = "your text3
Hello3"; Var i = 0; (I = 0;} and {i = i + 1;}}, 500) ;

You should control how you want to display messages after reaching the end of the array of messages: I have already made a loop to start with the message.

To do a fade in / out transition, simply add those functions, which put the ARUFF to the "write" sentence:

  $ ("#mMonMessage"). Fadeaut (800, 'swing', $ ("#dynamicMessage") HTML (V [i]) fadein (100)).   

See sample:

For more information, take a look at Fade:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -