2 * Vector-specific scripts
4 jQuery( function ( $ ) {
5 $( 'div.vectorMenu' ).each( function () {
7 $el.find( 'h3:first a:first' )
8 // For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298)
9 .click( function ( e ) {
10 $el.find( '.menu:first' ).toggleClass( 'menuForceShow' );
13 // When the hidden link has focus, also set a class that will change the arrow icon
15 $el.addClass( 'vectorMenuFocus' );
18 $el.removeClass( 'vectorMenuFocus' );
23 * Collapsible tabs for Vector
25 var $cactions = $( '#p-cactions' );
27 // Bind callback functions to animate our drop down menu in and out
28 // and then call the collapsibleTabs function on the menu
30 .bind( 'beforeTabCollapse', function () {
31 // If the dropdown was hidden, show it
32 if ( $cactions.hasClass( 'emptyPortlet' ) ) {
34 .removeClass( 'emptyPortlet' )
36 .css( 'width', '1px' ).animate( { 'width': '24px' }, 390 );
39 .bind( 'beforeTabExpand', function () {
40 // If we're removing the last child node right now, hide the dropdown
41 if ( $cactions.find( 'li' ).length === 1 ) {
42 $cactions.find( 'h3' ).animate( { 'width': '1px' }, 390, function () {
43 $( this ).attr( 'style', '' )
44 .parent().addClass( 'emptyPortlet' );