Advertisement
Sucahyo4

Widget Melayang, Close double click

Sep 26th, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. <style type="text/css">
  2. #gb{
  3. position:fixed;
  4. top:20%;
  5. left: 31.5%;
  6. z-index:+999999;
  7. opacity:0.9;
  8. moz-opacity:0.9;
  9. }
  10. * html #gb{
  11. position:relative;
  12. }
  13. .gbcontent {
  14. float:right;
  15. padding:10px;
  16. margin-left: -67px;
  17. }
  18. </style>
  19. <script type='text/javascript'>
  20. function showHideGB(){
  21. var gb = document.getElementById("gb");
  22. var w = gb.offsetWidth;
  23. gb.opened ? moveGB(0, 30-w) : moveGB(20-w, 0);
  24. gb.opened = !gb.opened;
  25. }
  26. function moveGB(x0, xf){
  27. var gb = document.getElementById("gb");
  28. var dx = Math.abs(x0-xf) > 10 ? 100 : 1;
  29. var dir = xf>x0 ? 1 : -1;
  30. var x = x0 + dx * dir;
  31. gb.style.top = x.toString() + "px";
  32. if(x0!=xf){setTimeout("moveGB("+x+", "+xf+")", 10);}
  33. }
  34. </script>
  35. <div id="gb">
  36. <div class="gbtab" onclick="showHideGB()"> </div>
  37. <div class="gbcontent">
  38. <div style="text-align: center;top: 32px;left: 87px;overflow: hidden;position: absolute;background: #;padding: 0px 0px 0px 0px;border-radius: 1px;color: #000;z-index:+1000;">
  39. <a href="javascript:showHideGB()">
  40. x
  41. </a>
  42. </div>
  43. <center>
  44. <div style="text-align: center;text-align: center;
  45. background: #000;
  46. color: #fff;font-size: 11px;">
  47. Klik 2 kali untuk menutup iklan!</div>
  48. <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  49. <!-- droidcrud -->
  50. <ins class="adsbygoogle"
  51. style="display:inline-block;width:300px;height:250px"
  52. data-ad-client="ca-pub-6815029137708657"
  53. data-ad-slot="2878341920"></ins>
  54. <script>
  55. (adsbygoogle = window.adsbygoogle || []).push({});
  56. </script>
  57. </center></div></div>
  58.  
  59. Karya: Sucahyo
  60. Situs: www.droidcrud.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement