Changeset 5244
- Timestamp:
- 04/05/2017 01:14:12 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/js/section-faq.js
r5195 r5244 7 7 $question.html( $button.text( $question.text() ) ); 8 8 } ) 9 .on( ' mousedown keydown', '.button-link', function( event ) {10 var $question = $( event. target );9 .on( 'click', function( event ) { 10 var $question = $( event.currentTarget ); 11 11 12 12 if ( 'keydown' === event.type && 13 !== event.which ) { … … 14 14 } 15 15 16 $question.toggleClass( 'no-focus', 'mousedown' === event.type );17 18 16 if ( ! $question.is( '.open' ) ) { 19 $question.siblings( '.open' ).toggleClass( 'open' ).attr( 'aria-expanded', false ). parent().next( 'dd' ).slideToggle( 200 );17 $question.siblings( '.open' ).toggleClass( 'open' ).attr( 'aria-expanded', false ).next( 'dd' ).slideToggle( 200 ); 20 18 } 21 19 22 $question. parent().toggleClass( 'open' ).attr( 'aria-expanded', function( index, attribute ) {20 $question.toggleClass( 'open' ).attr( 'aria-expanded', function( index, attribute ) { 23 21 return 'true' !== attribute; 24 22 } ).next( 'dd' ).slideToggle( 200 );
Note: See TracChangeset
for help on using the changeset viewer.