slideToggleを使用してプルダウンメニューを作成し、クリックプルダウンメニューにマスクなどの追加の効果を追加しています。プルダウンメニューの背景にモーダルマスクを表示しています。クリックアウト側ではマスクを非表示にしており、プルメニューはトグルして閉じます(プルアップ)。しかし、メニューがトグルしてプルアップしたときに.pullerクラスをクリックしてもマスクを非表示にできませんが、背景マスクは非表示になりません。
$(".puller").click(function() {
//Get the screen height and width
var maskHeight = $(document).height();
var maskWidth = $(window).width();
//Set height and width to mask to fill up the whole screen
$('#mask').css({'width':maskWidth,'height':maskHeight});
//transition effect
$('#mask').fadeTo("slow",0.6);
$(".patientDetail").slideToggle();
});
$('#mask').click(function () {
$(this).fadeTo("fast",0);
$(this).hide("fast");
$(".patientDetail").slideToggle();
});