Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- #bn-bar {
- -moz-transition: all 0.5s ease;
- -webkit-transition: all 0.5s ease;
- -transition: all 0.5s ease;
- position: fixed;
- -webkit-transform: translateZ(0);
- width: 100%;
- height: 40px;
- line-height:40px;
- top: -35px;
- font-size:14px;
- z-index: 10000;
- background-color:#FF9900;
- font-family: "Helvetica Neue", "Arial", sans-serif;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- -webkit-box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.2);
- box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.2);
- text-align:center;
- }
- #hider {
- height:100%;
- width:30px;
- z-index:10001;
- float:right;
- background-color:#efefef;
- background-image:url('close_small.png');
- background-position: 7px 5px;
- background-repeat:no-repeat;
- }
- #hider:hover {
- background-color:#fff;
- cursor:pointer;
- }
- </style>
- <script>
- var autohide;
- $('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>');
- $(document).ready(function(){
- $("#hider").click(function(){
- $("#bn-bar").animate({
- top: "-50"
- }, "fast","linear", function(){});
- })
- $("#bn-bar").mouseover(function(){clearTimeout(autohide);});
- setTimeout(function(){$("#bn-bar").animate({top: "0"}, "slow","linear", function(){});},2500);
- autohide = setTimeout(function(){$("#bn-bar").animate({top: "-30"}, "fast","linear", function(){});},10000);
- })
- </script>
Add Comment
Please, Sign In to add comment