perazite

Close Button

May 12th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1. ADD to global script
  2. function closeCanvas(evt) {
  3.   evt.preventDefault();  
  4.   document.getElementsByTagName('head')[0].innerHTML = '';
  5.   var _body = document.getElementsByTagName('body')[0];
  6.   _body.innerHTML = '';
  7.   _body.style.backgroundColor = 'transparent';
  8. }
  9.  
  10. 2. ADD position:relative to id "animation_container"
  11. <div id="animation_container" style="position:relative; background-color:rgba(255, 255, 255, 1.00); width:600px; height:1200px; cursor: pointer">
  12.  
  13.  
  14. 3. ADD closebutton code
  15. <a href="javascript:void(0);" onclick="closeCanvas(event);" style="position: absolute; right: 0; top: 0; z-index:1;"><img src="btn-close.png"></a>
Add Comment
Please, Sign In to add comment