| 14 | |
| 15 | //Drop |
| 16 | function goDrop(){ |
| 17 | //Making button invisible |
| 18 | bu.setAttribute("style","visibility:hidden;"); |
| 19 | |
| 20 | //Playing Audio |
| 21 | goAudio(); |
| 22 | |
| 23 | //Making animation as running state |
| 24 | pl.setAttribute("style","visibility:visible; animation-play-state:running;"); |
| 25 | ai.setAttribute("style","visibility:hidden;animation-play-state:running;"); |
| 26 | |
| 27 | //To trigger the text |
| 28 | wr.innerHTML = "Wait for button to reappear!"; |
| 29 | wr.setAttribute("style","visibility:visible;"); |
| 30 | |
| 31 | //To trigger drop animation |
| 32 | setTimeout(function(){ |
| 33 | |
| 34 | im.setAttribute("style","visibility:visible;"); |
| 35 | |
| 36 | } |
| 37 | , 6000); |
| 38 | |
| 39 | //To close the plane animation |
| 40 | setTimeout(function(){ |
| 41 | //Making animation again to pause state |
| 42 | pl.setAttribute("style","visibility:hidden;animation-play-state:paused;"); |
| 43 | ai.setAttribute("style","visibility:hidden;animation-play-state:paused;"); |
| 44 | |
| 45 | //Making image and text as hidden again |
| 46 | im.setAttribute("style","visibility:hidden;"); |
| 47 | wr.setAttribute("style","visibility:hidden;"); |
| 48 | |
| 49 | //Making button visible again |
| 50 | bu.setAttribute("style","visibility:visible;"); |
| 51 | |
| 52 | } |
| 53 | , 12000); |
| 54 | |
| 55 | } |
| 56 | |
| 57 | //audio |
| 58 | function goAudio(){ |