IE8では、以下のコードを実行すると警告が表示されません。場合によっては最初のボタンを返します。IE8セレクタまたはjQuery ButtonSetが一貫して適切な結果を返さない(ラジオボタン)
I asked a similar question to this on SO.これはおそらく同じ問題です。それは明らかではないので、私は2番目の質問をすることにしました。
This one is also related. And this one しかし、彼らは両方とも私が今何をすべきかわからないことを十分にすることによってマークを欠場。
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/themes/south-street/jquery-ui.css" rel='stylesheet' type='text/css'>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.11/jquery-ui.js"></script>
<script language="javascript">
$(document).ready(function() {
$("#toolGroup").buttonset();
$("#toolGroup").click(
function() {
alert($('input:radio[name=marker]:checked').val());
}
);
});
</script>
</head>
<body>
<div id="toolGroup">
<input name="marker" type="radio" id="check1" value="tool1" checked /><label for="check1"><img src="/images/tool1.png" width="40" /></label>
<input name="marker" type="radio" id="check2" value="tool2" /><label for="check2"><img src="/images/tool2.png" width="40" /></label>
<input name="marker" type="radio" id="check3" value="tool3" /><label for="check3"><img src="/images/tool3.png" width="40" /></label>
</div>
</body>
</html>
日時:変更 - この1つをチェックhttp://stackoverflow.com/questions/9344663/jquery-1-7-1-buttonset -in-ie-8-consistent-firing-the-change-event – 010110110101
私のために働く... http://jsfiddle.net/wcJcY/1/ –