0
需要幫助..這是我的fiddle。當外部點擊並顯示鏈接被點擊時,Javascript彈出隱藏
它顯示了一個彈出第一次加載..
的問題是,當我在彈出點擊了它hides..how避免發生這種情況..還當我點擊一個鏈接,應該顯示再次彈出,當我點擊彈出它會隱藏之外..
腳本
$(document).ready(function() {
// When site loaded, load the Popupbox First
loadPopupBox();
$("#popupBoxClose").click(function() {
alert('hello');
unloadPopupBox();
});
$("#popup_box").click(function() {
e.stopPropagation();
});
$('#global_wrapper').click(function() {
unloadPopupBox();
});
$('.secure').click(function() {
loadPopupBox();
});
});
function unloadPopupBox() { // TO Unload the Popupbox
$('#popup_box').fadeOut("slow");
$("#container").css({ // this is just for style
"opacity": "1"
});
}
function loadPopupBox() { // To Load the Popupbox
$('#popup_box').show();
$("#container").css({ // this is just for style
"opacity": "0.3"
});
}
我see..that就是爲什麼我的'e.stopPropagation();'沒有工作..感謝...你還需要stopPropogation()的$內 – Snippet
( '安全')點擊......因爲從技術上講,您還要點擊#global_wrapper(這會再次隱藏彈出窗口。 –
好的謝謝你.. – Snippet