Bootstrap 3 Media Queries

5 anos atrás
@media only screen and (min-width : 320px) { } @media only screen and (min-width : 480px) { } @media only screen and (min-width : 768px) { } jQuery.noConflict()(function($){ $(document).ready(function(){ var sticky_navigation_offset_top = $('#mainmenu-block-bg').offset().top; var sticky_navigation = function(){ var scroll_top = $(window).scrollTop(); // our current vertical position from the top var menuheight = $('#mainmenu-block-bg').height(); if (scroll_top > sticky_navigation_offset_top) { $('#mainmenu-block-bg').css({ 'background': 'rgba(35,40,45,0.9)','position': 'fixed', 'top':0, 'left':0, 'z-index':11 }); $('body').css({ 'padding-top': menuheight }); } else { $('#mainmenu-block-bg').css({ 'top':0, 'position': 'relative','padding-top':0, 'background': '#23282d' }); $('body').css({ 'padding-top': 0 }); } }; // run our function on load sticky_navigation(); // and run it again every time you scroll $(window).scroll(function() { sticky_navigation(); }); }); });