我正在使用jQuery的顯示插件顯示彈出。我正在尋找一種方式在jQuery或JavaScript中,我可以觸發一個適當的事件時,通過按Esc鍵或點擊彈出式外彈出關閉。有什麼方法可以捕捉到這個事件?檢測jQuery的揭示插件模式關閉esc鍵或點擊外部
而且對揭示插件的網站只有幾個選項裏給出,如:
$('#myModal').reveal({
animation: 'fadeAndPop', //fade, fadeAndPop, none
animationspeed: 300, //how fast animtions are
closeonbackgroundclick: true, //if you click background will modal close?
dismissmodalclass: 'close-reveal-modal' //the class of a button or element that will close an open modal
});
是否有這個插件的任何更多的選擇?如果是這樣,請爲我提供鏈接。
謝謝你,很好的答案 – Abhi