Guest User

Untitled

a guest
Jun 25th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. <style type="text/css">
  2. #bn-bar {
  3. -moz-transition: all 0.5s ease;
  4. -webkit-transition: all 0.5s ease;
  5. -transition: all 0.5s ease;
  6. position: fixed;
  7. -webkit-transform: translateZ(0);
  8. width: 100%;
  9. height: 40px;
  10. line-height:40px;
  11. top: -35px;
  12. font-size:14px;
  13. z-index: 10000;
  14. background-color:#FF9900;
  15. font-family: "Helvetica Neue", "Arial", sans-serif;
  16. -webkit-box-sizing: border-box;
  17. -moz-box-sizing: border-box;
  18. box-sizing: border-box;
  19. -webkit-box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.2);
  20. -moz-box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.2);
  21. box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.2);
  22. text-align:center;
  23. }
  24. #hider {
  25. height:100%;
  26. width:30px;
  27. z-index:10001;
  28. float:right;
  29. background-color:#efefef;
  30. background-image:url('close_small.png');
  31. background-position: 7px 5px;
  32. background-repeat:no-repeat;
  33. }
  34.  
  35. #hider:hover {
  36. background-color:#fff;
  37. cursor:pointer;
  38. }
  39. </style>
  40.  
  41. <script>
  42. var autohide;
  43. $('body').prepend('<div id="bn-bar"><b>Need help or advice? <a href=#>Contact us</a> and we\'ll help you right away!</a></div>');
  44. $(document).ready(function(){
  45. $("#hider").click(function(){
  46. $("#bn-bar").animate({
  47. top: "-50"
  48. }, "fast","linear", function(){});
  49. })
  50. $("#bn-bar").mouseover(function(){clearTimeout(autohide);});
  51. setTimeout(function(){$("#bn-bar").animate({top: "0"}, "slow","linear", function(){});},2500);
  52. autohide = setTimeout(function(){$("#bn-bar").animate({top: "-30"}, "fast","linear", function(){});},10000);
  53. })
  54. </script>
Add Comment
Please, Sign In to add comment