summaryrefslogtreecommitdiff
path: root/resources/jquery/jquery.mw-jump.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/jquery/jquery.mw-jump.js')
-rw-r--r--resources/jquery/jquery.mw-jump.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/resources/jquery/jquery.mw-jump.js b/resources/jquery/jquery.mw-jump.js
index 36b6690c..e2868341 100644
--- a/resources/jquery/jquery.mw-jump.js
+++ b/resources/jquery/jquery.mw-jump.js
@@ -1,12 +1,12 @@
/**
* JavaScript to show jump links to motor-impaired users when they are focused.
*/
-jQuery( function( $ ) {
+jQuery( function ( $ ) {
- $('.mw-jump').delegate( 'a', 'focus blur', 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' });
+ $( '.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' });
}