Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="mobile-phone" class="mobile-footer-link container">
- <div class="mobile-phone-icon">
- <a href="tel:+555555555">
- <span class="kwicon-fa-phone"></span>
- </a>
- </div>
- </div>
- <div id="mobile-contact" class="mobile-footer-link container">
- <div class="mobile-contact-icon">
- <a href="mailto:company@mail.dk">
- <span class="kwicon-fa-envelope"></span>
- </a>
- </div>
- </div>
- jQuery(window).load(function ($) {
- "use strict";
- var prev = 0;
- var $window = jQuery(window);
- var nav = jQuery('.mobile-footer-link');
- $window.on('scroll', function(){
- var scrollTop = $window.scrollTop();
- nav.toggleClass('nav-down', scrollTop > prev);
- prev = scrollTop;
- });
- });
- .nav-down {
- bottom: -115px;
- }
- .mobile-footer-link {
- position: fixed;
- bottom: 15px;
- transition: bottom 0.2s ease-in-out;
- .... [rest edited out]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement