You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$(window).resize(function(){varbreakpoint=window.getComputedStyle(document.querySelector('body'),':before').getPropertyValue('content').replace(/['"]+/g,'');// Do the thing based on the breakpoint.});
Which is related to a more robust plugin found here:
$(function(){// https://stackoverflow.com/a/28373319/922323// https://github.com/garand/sticky/issues/211// https://github.com/JoshBarr/on-media-queryvar$sticky=$('.sticky');varoptions={topSpacing: 10,responsiveWidth: true};$sticky.sticky(options);$('body').on('BREAKPOINT',function(event,size){if(size<=1){$sticky.unstick();}else{$sticky.sticky(options);}});});//----------------------------------------------------------------------// THIS SHOULD COME LAST!//----------------------------------------------------------------------$(function(){varmqDetector=$('#mq-detector');varmqSelectors=[mqDetector.find('.visible-xs'),mqDetector.find('.visible-sm'),mqDetector.find('.visible-md'),mqDetector.find('.visible-lg')];varcheckForResize=function(){for(vari=0;i<=mqSelectors.length;i++){if(mqSelectors[i].is(':visible')){if(window.BREAKPOINT!=i){window.BREAKPOINT=i;console.log(mqSelectors[i].attr('class'));$('body').trigger('BREAKPOINT',mqSelectors[i].data('id'));}break;}}};window.BREAKPOINT=undefined;$(window).on('resize',checkForResize);checkForResize();});
The text was updated successfully, but these errors were encountered:
I know it's not all CSS here, but this is useful:
There's this approach:
Which is related to a more robust plugin found here:
And this other approach:
Put this anywhere in your document:
The above uses Bootstrap 3’s CSS:
Then this JS:
The text was updated successfully, but these errors were encountered: