我正在使用一个按钮打开一个ajax html弹出窗口,点击相同的按钮我想在新标签页中打开另一个页面...任何帮助表示赞赏
这是我正在使用的HTML代码
<a href="test.html" class="ajax-popup-link"><button type="button" style="background:green;float:right;">Activate</button></a>
这是javascript函数
<script src="../assets/jquery.magnific-popup.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.ajax-popup-link').magnificPopup({
type: 'ajax',
overflowY: 'scroll',
closeOnContentClick: false
});
});</script>
答案 0 :(得分:1)
向其添加另一个事件:
$('.ajax-popup-link').click(function(){
window.open("/some-link.html"); // you can pass options
});