0
我正在使用bPopup jquery插件來打開模式彈出窗口中的ajax html文件,但我想擴展它以便在未點擊模式中的下一張幻燈片出來嗎?如何實現模式下的Ajax彈出窗口Next/Prev
下面是我使用的當前代碼:
$(document).ready(function() {
$('.my-button').bind('click', function(e) {//select all the buttons with a class selector
var loadFile = $(this).data("file");
// Prevents the default action to be triggered.
e.preventDefault();
// Triggering bPopup when click event is fired
$('#element_to_pop_up').bPopup({
contentContainer:'.content',
loadUrl: loadFile //Uses jQuery.load()
});
});
});
<button data-file="test1.html" class="my-button">Load one modal</button>
<button data-file="test2.html" class="my-button">Load another modal</button>
<button data-file="test3.html" class="my-button">Load a third modal</button>
例如,如果test1.html是在模式打開,我想去開模框內test2.html無關閉test1.html,並在另一個模式中打開test2.html,有沒有辦法做到這一點?我曾嘗試添加開放模式,但它確實觸發了一個事件。