2019-01-14 16:00:07 -05:00
|
|
|
/* eslint-disable jquery/no-global-selector */
|
2018-05-20 06:29:50 -04:00
|
|
|
$( function () {
|
2018-06-05 05:19:01 -04:00
|
|
|
var mobileCutoffWidth = 550,
|
2018-05-20 06:29:50 -04:00
|
|
|
ULSTrigger = $( '#pt-uls' ),
|
|
|
|
ULSMoved = false;
|
|
|
|
|
|
|
|
function moveULS() {
|
|
|
|
if ( ULSTrigger.length ) {
|
|
|
|
if ( !ULSMoved && $( window ).width() <= mobileCutoffWidth ) {
|
|
|
|
ULSTrigger.insertBefore( $( '#pt-preferences' ) );
|
|
|
|
|
|
|
|
ULSMoved = true;
|
|
|
|
} else if ( ULSMoved && $( window ).width() > mobileCutoffWidth ) {
|
|
|
|
ULSTrigger.prepend( $( '#p-preferences' ) );
|
|
|
|
|
|
|
|
ULSMoved = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-14 16:00:07 -05:00
|
|
|
$( window ).on( 'resize', moveULS );
|
2018-05-20 06:29:50 -04:00
|
|
|
moveULS();
|
|
|
|
} );
|