Overriding check box in JavaScript with jQuery

前端 未结 3 1985
迷失自我
迷失自我 2020-12-07 04:32

Help with unit testing checkbox behavior. I have this page:




    
    

        
3条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 05:33

    Here is a work around.

    Now my code is like this:

            if ($.browser.msie) {
                $('#makeHidden').change(function () {
                    this.blur();
                    this.focus();
                    onCheckboxClicked();
                });
            }
            else {
                $('#makeHidden').change(function() {
                    return onCheckboxClicked();
                });
            }
    

    All my tests including manual toy and manual production are good.

    Anybody have something better than this hack?

提交回复
热议问题