StefanoF

Soluzione Doppio Logo

Mar 6th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <script>
  2. ( function( $ ) {
  3. $( document ).ready( function() {
  4. if ( $( window ).width() >= 1024 ) {
  5. if ( $( window ).scrollTop() == 0 ) {
  6. $( ".main_logo" ).show();
  7. $( ".fixed_logo" ).hide();
  8. }
  9. $( window ).on( 'scroll', function() {
  10. if ( $( window ).scrollTop() != 0 ) {
  11. $( ".main_logo" ).hide();
  12. $( ".fixed_logo" ).show();
  13. } else {
  14. $( ".fixed_logo" ).hide();
  15. $( ".main_logo" ).show();
  16. }
  17. } );
  18. }
  19. } );
  20. } )( jQuery );
  21. </script>
Advertisement
Add Comment
Please, Sign In to add comment