Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="left-ad-slot-container">
- <style>
- .ad_unit_left {
- width: 160px;
- height: 600px;
- position: fixed;
- left: 0;
- top: calc(50% - 300px);
- display: none;
- z-index: 9999;
- }
- </style>
- <script>
- if (typeof document.body.clientWidth !== 'undefined' && document.body.clientWidth > 1099) {
- jQuery(".close").click(function() {
- jQuery(".ad_unit_left").addClass("hide")
- });
- var top_show = 200;
- var delay = 500;
- var window_width = jQuery(window).width();
- if (window_width > 900) {
- jQuery(window).scroll(function() {
- if (jQuery(this).scrollTop() > top_show) {
- jQuery('.ad_unit_left').fadeIn();
- } else {
- jQuery('.ad_unit_left').fadeOut();
- }
- });
- }
- }
- </script>
- <div class="ad_unit_left">
- <div class="close">x</div>
- <!-- ad 160x600 -->
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement