フォームの外側をクリックすると、次を使用して div とオーバーレイ div を非表示にします。
次の JavaScript は次のとおりです。
$(document).mouseup(function (e)
{
var container = $("#feedbackform");
var overlay = $("#overlay");
if (!container.is(e.target) // if the target of the click isn't the container...
&& container.has(e.target).length === 0) // ... nor a descendant of the container
{
$('#feedbackform').fadeOut('fast'),
$('#overlay').fadeOut('fast');
}
});
これはデスクトップでは正常に機能しますが、タッチ モバイル デバイスでは機能しません。
マウスアップと関係があると思いますが、何か提案はありますか?
クレイグ。