我有一个模态。我在其中添加了带有href链接的treeview。当我尝试单击它时,它不是go href网站。在Modal中不起作用。
请帮助我解决这个问题。
我的HTML代码:
<div aria-describedby="modal1Desc" aria-labelledby="modal1Title" class="remodal" data-remodal-id="modal" role="dialog" style="max-height:450px; overflow:auto;"><button aria-label="Close" class="remodal-close" data-remodal-action="close"></button>
<link href="https://silsupur.org/WebPart/TreeViewMenu-css?v=4xO27ePt9p3bZ1f5vbsNkq8yPFdQHFtZ47xJbc2v-TI1" rel="stylesheet"/>
<div class="BaseAccordionMenu bam-easing" id="534f8c94498949fb97f41bd8f77667e5" style="display:none;" >
<h3></h3>
<ul>
<li>
<i></i>
<a href="#">homepage</a>
<ul>
<li>
<i></i>
<a href="#">otherpage</a>
<ul>
<li>
<i></i>
<a href="https://www.google.com" target="_blank">try1</a>
</li>
<li>
<i></i>
<a href="https://www.yandex.com" target="_blank">try2</a>
</li>
</ul>
</div>
jquery; (src未被分配?)
$(document).ready(function() {
var src = $('#modal').children('iframe').attr('src'); //popup ID'si buraya eklenmeli
$('.remodal-close'),$('.remodal-cancel'),$('.remodal-wrapper').click(function(e) {
e.preventDefault();
$('#modal').children('iframe').attr('src', '');
$('.popup-bg').fadeOut();
});
});