It looks like you're new here. If you want to get involved, click one of these buttons!
window.openModal = function(modal, btn, span) { btn.onclick = function() { $(modal).fadeIn( "slow" ); } $(span).click(function() { $(modal).fadeOut( "slow" ); }); window.onclick = function(event) { if (event.target == modal) { $(modal).fadeOut( "slow" ); } } }
<<script>> window.onload = function () { window.openModal(document.getElementById("teuthModal"), document.getElementById("teuthTrigger"), document.getElementsByClassName("close")[0]); window.openModal(document.getElementById("oxyModal"), document.getElementById("oxyTrigger"), document.getElementsByClassName("close")[1]); window.openModal(document.getElementById("coldModal"), document.getElementById("coldTrigger"), document.getElementsByClassName("close")[2]); } <</script>>
Comments
You need to use either the PassageDone special passage or the postdisplay Task Object, it would look something like either of the following:
Edit: Actually, never mind. I figured out I can just put the postdisplay task in a script tag on the passages that need modals.