Browse Source

Revert Pique assets change from another PR

Allan Cole 6 năm trước cách đây
mục cha
commit
2399cad28c
1 tập tin đã thay đổi với 2 bổ sung6 xóa
  1. 2 6
      pique/assets/js/front-page.js

+ 2 - 6
pique/assets/js/front-page.js

@@ -55,17 +55,13 @@
 
 		// Use scrollTo library to smoothly scroll between panels.
 		// Note that the admin bar lenght is only taken into consideration on screen size > 480px, when it becomes fixed.
-		// Also, we take into account the height of the primary menu after 768px.
+		// Also, we take into account he height of the primary menu after 768px.
 		$navLinks.click( function() {
 			var yCoord = ( 1 === $adminBar.length && $( window ).outerWidth() > 480 ) ? $adminBar.outerHeight() : 0;
 			var offset = $( window ).outerWidth() > 768 ? $primaryMenu.outerHeight() : 0;
-			var offsetParams = {};
-			if ($('#wpadminbar').length > 0) {
-				offsetParams = { 'top': -1 * ( yCoord + offset ) };
-			}
 			$.scrollTo( $( this ).attr( 'href' ), {
 				duration: 400,
-				offset: offsetParams
+				offset: { 'top': -1 * ( yCoord + offset ) }
 			} );
 		});
 	}