ページにラジオボタンのセットがあります。変更時にどのボタンがチェックされていないか知りたいのですが、onchange
イベント$(this)
で新しく選択されたボタンを参照する場合、古い未選択のボタンを取得する方法はありますか?
window.old = null;
$('.radio').change(function(){
alert($(this).val()); // this is the selected
alert($(window.old).val()); // this is the old one
})