'); var stylesAdded = false; var sanityCheckHeight = 150; // @match $.fbHeader, setHeroOffset() // Partial @match: setHeroOffset(), .repositionBg() function setHeroOffset() { var isMobile = ( $('#menu-toggle').is(':visible') ); var $header = ( isMobile ) ? $('#branding-column') : $('#masthead'); if ( $header.length < 1 ) { console.warn('Header not found.'); return; } var headerH = parseInt( $header.children().first().outerHeight() ) if ( isNaN(headerH) || headerH === 0 ) { console.warn('Header does not have a height.'); return; } if ( headerH > sanityCheckHeight ) { console.warn('Header too tall. Setting default.'); headerH = ( isMobile ) ? 59 : 90; } var top = headerH; // Get header top position relative to document. Using placeholder since sticky (fixed pos) header will have top offset of 0 var headerOffset = $('#js-masthead-position').offset(); // Header not at top of document? (e.g. due to an alert bar) if ( typeof headerOffset !== 'undefined' && typeof headerOffset.top === 'number' && headerOffset.top > 0 ) { var scrollPosTop = parseInt( $(window).scrollTop() ); var stickyAdjustment = headerOffset.top - scrollPosTop; // ...and user hasn't entirely scrolled past site header? if ( (stickyAdjustment + headerH) > 0 ) { // Add vertical space above header to mega bg position top += stickyAdjustment; } } // Hero adjustments $styles.html('.company-hero-row-1, .has-hero-bg .hero-section { margin-top: -' + parseFloat(top) + 'px; } .has-hero-overhang .hero-section .overhang-wrapper { margin-bottom: -' + parseFloat(top) + 'px; } .company-hero-row-1, .has-hero-overhang .hero-section + .uk-section, .has-hero-bg .hero-section { padding-top: ' + parseFloat(top) + 'px; } .has-hero-bg .hero-section { padding-bottom: ' + parseFloat(top) + 'px; } .hero-intro-container { margin-bottom: ' + parseFloat(top) + 'px; }'); // Nav/header adjustments if ( typeof stickyAdjustment === 'number' && (stickyAdjustment + headerH) > 0 ) { $styles.append('@media screen and (max-width: 1160px) { .main-nav-container { top: ' + parseFloat(top) + 'px; } .tray-open .site-header { top: ' + parseFloat(stickyAdjustment) + 'px; } }'); } else { $styles.append('@media screen and (max-width: 1160px) { .main-nav-container { top: ' + parseFloat(top) + 'px; } .tray-open .site-header { top: auto; } }'); } if ( !stylesAdded ) { $styles.appendTo('head'); stylesAdded = true; } } setHeroOffset(); $(window).on('debouncedresize trayopen trayclose', setHeroOffset); $(document.body).on('post-load', setHeroOffset); })(jQuery);

Newsroom

Top Stories

Facebook

Supporting Equitable Access to COVID-19 Vaccines

We’re donating $5 million to support equitable vaccine distribution around the world and making it easier for people to get reliable information about COVID-19 and vaccines.
Facebook

Supporting the Asian and Pacific Islander Community

This Asian Pacific American Heritage Month, we’re celebrating the diversity and impact of Asians and Pacific Islanders while also raising awareness of issues the community is facing.
Portal

Celebrate #MothersWeek with Portal

Mother’s Day is around the corner, and this year, Portal is celebrating #MothersWeek because one day isn’t enough to acknowledge all that mothers do.
Categories
Topics
Facebook app

Connecting Local Communities on Facebook

We’re beginning to test Facebook Neighborhoods, a dedicated space within the Facebook app to help you connect with your neighbors and discover new places nearby.

To help personalize content, tailor and measure ads, and provide a safer experience, we use cookies. By clicking or navigating the site, you agree to allow our collection of information on and off Facebook through cookies. Learn more, including about available controls: Cookies Policy