✏️ 编辑:taxonomy.js
路径:
/home/forge/kingkrunch.com/wp/wp-content/plugins/templatemela-metabox/js/taxonomy.js
大小:920 B · 修改:2020-09-11 16:13:48 · 权限:0775 · 可写
← 返回目录
👁 查看
⬇ 下载
jQuery( document ).ready( function( $ ) { $( '.rw-taxonomy-tree input:checkbox' ).change( function() { var $this = $( this ), $childList = $this.parent().siblings( '.rw-taxonomy-tree' ); if ( $this.is( ':checked' ) ) { $childList.removeClass( 'hidden' ); } else { $childList.find( 'input' ).removeAttr( 'checked' ); $childList.addClass( 'hidden' ); } } ); $( '.rw-taxonomy-tree select' ).change( function() { var $this = $( this ), $childList = $this.siblings( '.rw-taxonomy-tree' ), $value = $this.val(); $childList.removeClass( 'active' ).addClass( 'disabled' ).find( 'select' ).each( function() { $( this ).val( $( 'options:first', this ).val() ).attr( 'disabled', 'disabled' ); } ); $childList.filter( '.rwmb-taxonomy-' + $value ).removeClass( 'disabled' ).addClass( 'active' ).children( 'select' ).removeAttr( 'disabled' ); } ); } );
💾 保存
取消
保存为 UTF-8,换行统一为 LF