Internet Explorer 7/8 でいくつかの入力にフォーカスしてボックスを選択しようとすると、同じ古いエラーが発生します。
jQuery コードは次のとおりです。
$("#planner input, #planner select").on("focus",function() {
panel = $(this).parents(".panel").first();
if (!panel.hasClass("active")) {
tab = panel.data("tab");
$("#planner .tabs li[data-tab="+tab+"] a").trigger("click");
}
});
誰でも私を助けることができますか?
編集:
ここにコード全体を貼り付けます
<script>
$(document).ready(function(){
$("#planner .tabs a").click(function() {
$(this).parents("#planner").find(".panel.active").removeClass("active");
$(this).parents("#planner").find(".tabs li.active").removeClass("active");
$(this).parent().addClass("active");
tab = $(this).parents("#planner").find(".tabs li").index($(this).parent());
panel = $(this).parents("#planner").find(".panel");
$(panel[tab]).addClass("active");
});
$("#planner #quote").validate({
ignore: "",
errorPlacement: function(error, element) {
error.appendTo(element.closest(".item"));
}
});
$("#planner input, #planner select").on("focus" , function() {
panel = $(this).parents(".panel").first();
if (!panel.hasClass("active")) {
tab = panel.data("tab");
$("#planner .tabs li[data-tab="+tab+"] a").trigger("click");
}
});
});
</script>