ラジオボタンのリストがあり、
そして、ラジオボタンのクリックイベントで実行される機能があります ここに私のjQueryがあります
$("input[type='radio']").click(function () {
var str = $(this).attr("class");
if (str == undefined) {
str = "";
}
if (str.search("selectedRadio") < 0) {
$("input[type='radio']").removeAttr("class").attr('checked', false);
$(this).attr('checked', true).attr("class", "selectedRadio");
id = $(this).attr('id');
MID= $("input[type='hidden'][name='HiddenMedID']").val();
ID = $(this).val();
PID = $("#GetNewPatientID").val();
$(this).parent().prepend("<img src='/icon_loading.gif' id = 'fetchingSP' width='18' height='18' id='PleaseWaitRadioCircle' />");
FunctionOne();
FunctionTwo(ID, PID, MID);
FunctionThree(ID, PID);
FunctionFour(ID, PID);
}
});
クリックイベントで以下の関数を使用すると 、ラジオボタンのクリックに遅延があることに気付きました。つまり、ユーザーがラジオ ボタンをクリックすると、そのラジオ ボタンを選択するのに 1 秒か 2 秒かかります。
FunctionOne();
FunctionTwo(ID, PID, MID);
FunctionThree(ID, PID);
FunctionFour(ID, PID);
クリックイベントでこれらの4つの機能を削除またはコメントすると、遅延が発生しないため、これがどのように関連しているかわかりません。
これは、カミソリ ビューの ASP.Net MVC3.0 アプリケーションです。