跨度内的复选框onclick of span ..检查输入.. jquery递归问题

0 recursion jquery click

此代码导致递归行为..

我希望能够单击范围中的文本并选中/取消选中子输入并触发子输入的单击事件.

http://jsfiddle.net/cwfontan/ALEBr/

        <span class="RedHover">
            <input type="checkbox" name="chkShowBusn" id="chkShowBusn" tabindex="9" />Business
        </span>



$('.RedHover').click(
        function (e) {
            try {
                $(this).children('input').trigger('click');
                e.stopPropagation();
                e.preventDefault();
                console.log('here');
            } catch (e) {
                //handle no click event.alert
                console.log(e.description);
            }
        }
    );
Run Code Online (Sandbox Code Playgroud)

kei*_*kei 8

<input type="checkbox" name="chkShowBusn" id="chkShowBusn" tabindex="9" />
<label for="chkShowBusn">Business</label>
Run Code Online (Sandbox Code Playgroud)

你甚至不需要jQuery ......