编辑:accordion.js
/** * Accordion-folding functionality. * * Markup with the appropriate classes will be automatically hidden, * with one section opening at a time when its title is clicked. * Use the following markup structure for accordion behavior: * * <div class="accordion-container"> * <div class="accordion-section open"> * <h3 class="accordion-section-title"><button type="button" aria-expanded="true" aria-controls="target-1"></button></h3> * <div class="accordion-section-content" id="target"> * </div> * </div> * <div class="accordion-section"> * <h3 class="accordion-section-title"><button type="button" aria-expanded="false" aria-controls="target-2"></button></h3> * <div class="accordion-section-content" id="target-2"> * </div> * </div> * <div class="accordion-section"> * <h3 class="accordion-section-title"><button type="button" aria-expanded="false" aria-controls="target-3"></button></h3> * <div class="accordion-section-content" id="target-3"> * </div> * </div> * </div> * * Note that any appropriate tags may be used, as long as the above classes are present. * * @since 3.6.0 * @output wp-admin/js/accordion.js */ ( function( $ ){ $( function () { // Expand/Collapse accordion sections on click. $( '.accordion-container' ).on( 'click', '.accordion-section-title button', function() { accordionSwitch( $( this ) ); }); }); /** * Close the current accordion section and open a new one. * * @param {Object} el Title element of the accordion section to toggle. * @since 3.6.0 */ function accordionSwitch ( el ) { var section = el.closest( '.accordion-section' ), container = section.closest( '.accordion-container' ), siblings = container.find( '.open' ), siblingsToggleControl = siblings.find( '[aria-expanded]' ).first(), content = section.find( '.accordion-section-content' ); // This section has no content and cannot be expanded. if ( section.hasClass( 'cannot-expand' ) ) { return; } // Add a class to the container to let us know something is happening inside. // This helps in cases such as hiding a scrollbar while animations are executing. container.addClass( 'opening' ); if ( section.hasClass( 'open' ) ) { section.toggleClass( 'open' ); content.toggle( true ).slideToggle( 150 ); } else { siblingsToggleControl.attr( 'aria-expanded', 'false' ); siblings.removeClass( 'open' ); siblings.find( '.accordion-section-content' ).show().slideUp( 150 ); content.toggle( false ).slideToggle( 150 ); section.toggleClass( 'open' ); } // We have to wait for the animations to finish. setTimeout(function(){ container.removeClass( 'opening' ); }, 150); // If there's an element with an aria-expanded attribute, assume it's a toggle control and toggle the aria-expanded value. if ( el ) { el.attr( 'aria-expanded', String( el.attr( 'aria-expanded' ) === 'false' ) ); } } })(jQuery);
保存文件
位置:
home
/
fembzvrs
/
zimeza.com
/
wp-admin
/
js
批量上传
创建
创建
批量权限
批量删除
名称
权限
大小
修改时间
操作
↑ 返回上级
-
-
-
-
widgets
drwxr-xr-x
-
2025-07-06 02:11
权限
删除
重命名
accordion.js
-rw-r--r--
2.86 KB
2024-10-13 23:09
编辑
下载
权限
删除
重命名
accordion.min.js
-rw-r--r--
758 B
2025-02-06 22:27
编辑
下载
权限
删除
重命名
color-picker.js
-rw-r--r--
9.54 KB
2021-03-18 23:01
编辑
下载
权限
删除
重命名
color-picker.min.js
-rw-r--r--
3.4 KB
2025-02-06 22:27
编辑
下载
权限
删除
重命名
inline-edit-tax.min.js
-rw-r--r--
2.93 KB
2025-02-06 22:27
编辑
下载
权限
删除
重命名
media-gallery.js
-rw-r--r--
1.27 KB
2021-02-24 00:45
编辑
下载
权限
删除
重命名
media-upload.min.js
-rw-r--r--
1.13 KB
2025-02-06 22:27
编辑
下载
权限
删除
重命名
password-strength-meter.min.js
-rw-r--r--
1.1 KB
2025-02-06 22:27
编辑
下载
权限
删除
重命名
site-health.js
-rw-r--r--
13.15 KB
2023-12-28 20:27
编辑
下载
权限
删除
重命名
site-health.min.js
-rw-r--r--
6.13 KB
2025-02-06 22:27
编辑
下载
权限
删除
重命名
site-icon.min.js
-rw-r--r--
2.2 KB
2025-02-06 22:27
编辑
下载
权限
删除
重命名
svg-painter.min.js
-rw-r--r--
1.53 KB
2025-02-06 22:27
编辑
下载
权限
删除
重命名
tags-box.js
-rw-r--r--
10.88 KB
2021-03-18 23:01
编辑
下载
权限
删除
重命名
tags-box.min.js
-rw-r--r--
3 KB
2025-02-06 22:27
编辑
下载
权限
删除
重命名
tags-suggest.js
-rw-r--r--
5.64 KB
2024-02-19 03:16
编辑
下载
权限
删除
重命名
tags-suggest.min.js
-rw-r--r--
2.22 KB
2025-02-06 22:27
编辑
下载
权限
删除
重命名
tags.js
-rw-r--r--
5.96 KB
2025-12-03 02:17
编辑
下载
权限
删除
重命名
tags.min.js
-rw-r--r--
2.41 KB
2025-12-03 02:17
编辑
下载
权限
删除
重命名
xfn.min.js
-rw-r--r--
458 B
2021-03-18 23:01
编辑
下载
权限
删除
重命名