Skip to content

jocundjackson/IAA_Flashcards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

IAA_Flashcards

How to use:

function flashcard_game(a){jQuery("#flashcards").remove();var g=[];jQuery.each(jQuery("div.entry-content table tbody tr td:odd"),function(k,l){g.push(jQuery(l).text().split("\n")[0])});var j=[];jQuery.each(jQuery("div.entry-content table tbody tr td:even span img"),function(k,l){j.push(jQuery(l))});var f=[];var c=5;while(f.length<c){var e=Math.floor(Math.random()*g.length);if(!f.includes(e)){f.push(e)}}var h=Math.floor(Math.random()*c);var b="";for(var d=0;d<c;d++){b+='<input type="radio" class="answer" id="student'+d+'" name="studentselection" value="';if(d!=h){b+="in"}b+='correct" onclick="check_answer()" /> <label for="student'+d+'">'+g[f[d]]+"</label><br/>"}jQuery('<div id="flashcards" style="background:#ccc; min-width:80%; min-height:30em; padding-left:5em; padding-top: .5em; height:80%; color:black; z-index:9999; position: absolute; left: 10%; top: 50px;"> <img src='+j[f[h]][0].currentSrc+' height="250em" width="250em"> <form>'+b+'<input type="button" onclick="flashcard_game()" value="Play Again!"> <input type="button" onclick="flashcard_game(true)" value="Play Mask Mode!"> </form> </div>').appendTo("body");if(a){jQuery("#flashcards").prepend('<div id="fauxmask"></div>');jQuery("#fauxmask").css({background:"#000",height:"9em",width:"16.7em",zindex:"99999",display:"block",position:"absolute",top:"8.2em"})}}function check_answer(){jQuery(".answer[value=correct]").next().css({backgroundColor:"#00ff00"})}flashcard_game();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published