jquery - Cycle through array with animation -


so want cycle through list of arrays when click button, i've found info can't figure out how , put code have already, check below see have already;

my current code

[1]: http://codepen.io/anon/pen/pqkywz 

if me out that'd great! it'd bonus if show me how style launch link, reason being annoying hell?

if cycle mean display name of games 1 one before displaying final name of game here can do,

here demo

so have altered pickrandomword() , tick() , created 2 global variables "i" , "s" below,

var = 0; var s;  function pickrandomword(frm) {         s = setinterval(function() {             tick(frm);         }, 180);     } function tick(frm) {      frm.wordbox.value = words[i+1];     i++;     if (i > 27) {         clearinterval(s);         var rnd = math.ceil(math.random() * numberofwords);          var index = words[rnd].indexof("/");          frm.wordbox.value = words[rnd].substring(0, index);         var link = document.getelementbyid("gamelink");         var str = words[rnd].substring(index + 1, words[rnd].length);         link.innerhtml = "<a class='launchlink' href ='steam://run/" + str + "'>launch</a>";         = 0;     } } 

as requested have created class launchlink "launch" button , have applied simple styling. can change styling according preferences.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -