IEでも画像をlabelタグでクリックしたい

普通はjquery.syg_imageradioとか使えばいいのですが、
画像をクリックしたいっていう特殊な事例の場合。

$(function () {
//IE Label img
        if ($.browser.msie) {
                $('label').click(function () {
                        $('#' + $(this).attr('for')).focus().click();
                });
        }
});

label img {
        cursor:pointer;
}

参考サイト
http://depthcode.com/2010/08/ie-label-img.html

投稿者:

ayako0802

フロントエンドエンジニア