updated plugin GP Premium
version 1.11.2
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -27,6 +27,7 @@
|
||||
'display': 'none'
|
||||
}).attr({
|
||||
id: 'sticky-placeholder',
|
||||
'aria-hidden': true,
|
||||
itemtype: null,
|
||||
itemscope: null,
|
||||
}),
|
||||
@ -72,7 +73,7 @@
|
||||
|
||||
unStick = function() {
|
||||
void 0;
|
||||
$placeholder.hide().removeClass( options.fixedClass ).removeClass( 'sticky-navigation-transition' );
|
||||
$placeholder.remove();
|
||||
|
||||
$element.removeClass(options.fixedClass)
|
||||
.css({
|
||||
@ -98,7 +99,8 @@
|
||||
'visibility': ''
|
||||
})
|
||||
.removeClass( 'sticky-navigation-transition' )
|
||||
.removeClass( 'navigation-transition' );
|
||||
.removeClass( 'navigation-transition' )
|
||||
.removeClass( 'sticky-nav-scrolling-up' );
|
||||
|
||||
if ( 'sticky-navigation' === $element.attr( 'id' ) ) {
|
||||
$element.attr( 'id', 'site-navigation' );
|
||||
@ -113,7 +115,9 @@
|
||||
|
||||
holdIt = function( forceBottom ) {
|
||||
void 0;
|
||||
$placeholder.show().addClass( options.fixedClass );
|
||||
|
||||
$( $placeholder ).insertAfter( $element ).show().addClass( options.fixedClass );
|
||||
|
||||
var offsetParent = $placeholder.offsetParent();
|
||||
|
||||
if ( forceBottom ) {
|
||||
@ -155,7 +159,11 @@
|
||||
});
|
||||
}
|
||||
|
||||
$placeholder.show().addClass( options.fixedClass );
|
||||
$( $placeholder ).insertAfter( $element ).show().addClass( options.fixedClass );
|
||||
|
||||
if ( $( '.gen-sidebar-nav' ).length ) {
|
||||
$placeholder.css( 'height', $element.outerHeight() );
|
||||
}
|
||||
|
||||
if ( 'left' == $element.css( 'float' ) || 'right' == $element.css( 'float' ) ) {
|
||||
$placeholder.css( 'float', $element.css( 'float' ) );
|
||||
@ -224,7 +232,7 @@
|
||||
},
|
||||
|
||||
syncWidth = function() {
|
||||
if( $placeholder.width() !== $element.outerWidth() ) {
|
||||
if ( $placeholder && $placeholder.width() !== $element.outerWidth() ) {
|
||||
$element.outerWidth( $placeholder.outerWidth() );
|
||||
}
|
||||
},
|
||||
@ -324,9 +332,11 @@
|
||||
if ( scrollDir === 'up' && topValue !== 0 ) {
|
||||
var newTopValue = scrollDistance > -topValue ? 0 : topValue + scrollDistance;
|
||||
$element.css( 'top', newTopValue + 'px' );
|
||||
$element.addClass( 'sticky-nav-scrolling-up' );
|
||||
} else if ( scrollDir === "down" && topValue > -offset ) {
|
||||
var newTopValue = scrollDistance > offset + topValue ? -offset : topValue - scrollDistance;
|
||||
$element.css( 'top', newTopValue + 'px' );
|
||||
$element.removeClass( 'sticky-nav-scrolling-up' );
|
||||
}
|
||||
}
|
||||
|
||||
@ -357,13 +367,6 @@
|
||||
var initialize = function( elem, opts ) {
|
||||
$element = $( elem );
|
||||
|
||||
$placeholder.remove();
|
||||
$element.after( $placeholder );
|
||||
|
||||
if ( $( '.gen-sidebar-nav' ).length ) {
|
||||
$placeholder.css( 'height', $element.outerHeight() );
|
||||
}
|
||||
|
||||
// adding a class to users div
|
||||
$element.addClass( options.namespaceClass );
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user