244bc6b050
Change-Id: I408ff717768a00de74868b52d390dcc4b3269bcd
23 lines
554 B
JavaScript
23 lines
554 B
JavaScript
/* eslint-disable no-jquery/no-global-selector */
|
|
$( function () {
|
|
var mobileCutoffWidth = 550,
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
|
|
$( window ).on( 'resize', moveULS );
|
|
moveULS();
|
|
} );
|