mirror of
https://github.com/YunoHost-Apps/mediawiki_ynh.git
synced 2024-09-03 19:46:05 +02:00
15 lines
443 B
JavaScript
15 lines
443 B
JavaScript
/**
|
|
* JavaScript to show jump links to motor-impaired users when they are focused.
|
|
*/
|
|
jQuery( function ( $ ) {
|
|
|
|
$( '.mw-jump' ).on( 'focus blur', 'a', function ( e ) {
|
|
// Confusingly jQuery leaves e.type as focusout for delegated blur events
|
|
if ( e.type === 'blur' || e.type === 'focusout' ) {
|
|
$( this ).closest( '.mw-jump' ).css({ height: 0 });
|
|
} else {
|
|
$( this ).closest( '.mw-jump' ).css({ height: 'auto' });
|
|
}
|
|
} );
|
|
|
|
} );
|