Make WordPress Core

Changeset 23855


Ignore:
Timestamp:
03/29/2013 07:50:40 AM (12 years ago)
Author:
markjaquith
Message:

Remove duplicated code that was accidentally committed in [23417].

fixes #23889. props DrewAPicture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/accordion.js

    r23417 r23855  
    1616    });
    1717});
    18 jQuery(document).ready( function($) {
    19     // Expand/Collapse
    20     $('.accordion-section-title').on('click keydown', function( event ) {
    21 
    22         if ( event.type === 'keydown' &&  13 !== event.which ) // enter
    23                 return;
    24 
    25         var clicked = $( this ).closest( '.accordion-section' );
    26 
    27         if ( clicked.hasClass('cannot-expand') )
    28             return;
    29 
    30         clicked.closest( '.accordion-container' ).find( '.accordion-section' ).not( clicked ).removeClass( 'open' );
    31         clicked.toggleClass( 'open' );
    32         event.preventDefault();
    33     });
    34 });
    35 jQuery(document).ready( function($) {
    36     // Expand/Collapse
    37     $('.accordion-section-title').on('click keydown', function( event ) {
    38 
    39         if ( event.type === 'keydown' &&  13 !== event.which ) // enter
    40                 return;
    41 
    42         var clicked = $( this ).closest( '.accordion-section' );
    43 
    44         if ( clicked.hasClass('cannot-expand') )
    45             return;
    46 
    47         clicked.closest( '.accordion-container' ).find( '.accordion-section' ).not( clicked ).removeClass( 'open' );
    48         clicked.toggleClass( 'open' );
    49         event.preventDefault();
    50     });
    51 });
Note: See TracChangeset for help on using the changeset viewer.