0
我使用AJAX彈出與magnificPopUp。我想在jQuery點擊事件中打開這個彈出窗口,但我現在不知道如何去做。打開magnificPopup Ajax彈出與jQuery
$('.popup').click(function() {
var id = $(this).attr('rel');
url = '/test-ajax.php?id=' + id;
alert("url" + url); //this shows the URL where the popUp should load
})
「正常」 蕩氣迴腸彈出類看起來如此:
$('.simple-ajax-popup-align-top').magnificPopup({
type: 'ajax',
alignTop: true,
overflowY: 'scroll'
});
感謝您的幫助。
雖然代碼是讚賞,它應該總是有一個附帶的解釋。這並不需要很長時間,但它是可以預料的。 – peterh