在“{3}} <p> <a href="">

时间:2017-10-16 13:13:42

标签: wordpress input hyperlink radio-button jquery-ui-tabs

I'm trying to make tabbed comments section for WordPress. I use jQuery UI tabs to make it work. I have styled radio switches between tags but it does not works. When I click a tab, link click happens and radio button does not change.

my code for first <li> element looks like this:

<li class="active ui-state-default ui-corner-top ui-tabs-active ui-state-active" id="comments-evolved-Facebook-control" role="tab" tabindex="0" aria-controls="comments-evolved-Facebook-tab" aria-labelledby="ui-id-1" aria-selected="true" aria-expanded="true">
    <a href="#comments-evolved-Facebook-tab" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-1">
        <div class="switch switch-Facebook">
            <input name="multicomments" id="Facebook-toggle" class="switch-control" type="radio">
            <label class="switch-toggle" for="Facebook-toggle">
                <div class="switch-handle"><span><i class="icon-multicommentsFacebook"></i></span>
                </div>
            </label>
        </div><span id="comments-evolved-Facebook-label">Label Example</span>
    </a>
</li>
see actual WordPress page:

中设置输入广播功能

1 个答案:

答案 0 :(得分:0)

解决!这是我添加的jQuery代码。

jQuery('#".$tab."').click(function() {
   jQuery('#".$tab."-toggle').prop('checked', true);
});

`".$tab."` is the `<li>` element ID
相关问题