vector.js 613 B

123456789101112131415161718192021
  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. });