Simple content rotation

Hello,

I am trying to create a simple function that will rotate html content on refresh of the page. I onnly have 2 different contents to display, so it doesn't have to be random either.

Sounds so simple, but I've looked everywhere and can't find anything..:)

Thank you!

Comments

  • [code]
    var l= true;
    function changeContent(){
    l=!l
    if (l) {m="first content";}
    else {m="second content";}
    return(m)}
    [/code]


    : Hello,
    :
    : I am trying to create a simple function that will rotate html
    : content on refresh of the page. I onnly have 2 different contents to
    : display, so it doesn't have to be random either.
    :
    : Sounds so simple, but I've looked everywhere and can't find
    : anything..:)
    :
    : Thank you!
    :
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion