Merge "(bug 38388) Add documentation for MediaWiki:Config-support-info"
[mediawiki.git] / skins / vector / vector.js
blobcc76b3282e3b4f062039b298214acccf5d5863ea
1 /*
2  * Vector-specific scripts
3  */
4 jQuery( function( $ ) {
5         $( 'div.vectorMenu' ).each( function() {
6                 var self = this;
7                 $( 'h5:first a:first', this )
8                         // For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298)
9                         .click( function( e ) {
10                                 $( '.menu:first', self ).toggleClass( 'menuForceShow' );
11                                 e.preventDefault();
12                         })
13                         // When the hidden link has focus, also set a class that will change the arrow icon
14                         .focus( function() {
15                                 $( self ).addClass( 'vectorMenuFocus' );
16                         })
17                         .blur( function() {
18                                 $( self ).removeClass( 'vectorMenuFocus' );
19                         });
20         });
21 });