Lint: Go-go-gadget jshint! Passing entire JS code base (again).
[lhc/web/wiklou.git] / resources / jquery / jquery.mw-jump.js
index 36b6690..e286834 100644 (file)
@@ -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' });
                }