Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CSS
- .simplesocialbuttons{
- -webkit-transition: 0.3s !important;
- transition: 0.3s !important;
- }
- .simplesocialbuttons.body-scrolled{
- -webkit-transform: translateY(50px) !important;
- transform: translateY(50px) !important;
- -webkit-transition: 0.3s !important;
- transition: 0.3s !important;
- }
- JAVASCRIPT
- <script>
- (function($){
- 'use strict';
- $(function(){
- var position = $(window).scrollTop();
- jQuery('.single .simplesocialbuttons').addClass('body-scrolled');
- $(window).scroll(function() {
- var scroll = jQuery(window).scrollTop();
- if(scroll > position) {
- jQuery('.single .simplesocialbuttons').addClass('body-scrolled');
- } else {
- jQuery('.single .simplesocialbuttons').removeClass('body-scrolled');
- }
- position = scroll;
- });
- });
- })(jQuery);</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement