我正在使用高级自定义字段(ACF) 并尝试以编程方式将转发器添加到现有组 (group_5621b0871e1b1),但它不起作用。相同的代码适用于文本字段,但不适用于转发器。
在我的插件中:
add_action( 'acf/init', 'acf_add_field_royalties' );
function acf_add_field_royalties() {
if ( function_exists( 'acf_add_local_field_group' ) ) {
acf_add_local_field( array (
'key' => 'field_store_royalties',
'label' => 'Royalties',
'name' => 'store_royalties1',
'type' => 'repeater',
'parent' => 'group_5621b0871e1b1',
'instructions' => '',
'required' => 0,
'conditional_logic' => 0,
'wrapper' => array (
'width' => '',
'class' => '',
'id' => '',
),
'collapsed' => '',
'min' => '',
'max' => '',
'layout' => 'table',
'button_label' => 'Add new royalty period',
'sub_fields' …Run Code Online (Sandbox Code Playgroud) 我怎么能让切换过渡看起来更柔和?我正在"切换"2个div:
$(document).ready(function(){
var tweet = $("ul.tweets li");
tweet.hover(function(){
$(this).find('.a').toggle()
.end().find('.b').toggle();
});
});
Run Code Online (Sandbox Code Playgroud)
这是小提琴