У меня есть функция, которая выбирает PDF из выпадающего списка, но вместо загрузки и отображения, он показывает только пустой модал. Идеи?
<li>
<a href="">Case Studies</a>
<ul class="rd-navbar-dropdown">
<li class="rd-navbar-aside-right">
<a id="ai_dropdown" data-toggle="modal" data-target="#myModal" href="white-papers/transformation_of_the_cookie/1.pdf#toolbar=0">Case Study 1</a><br>
<a id="ai_dropdown" data-toggle="modal" data-target="#myModal" href="white-papers/transformation_of_the_cookie/2.pdf#toolbar=0">Case Study 2</a><br>
<a id="ai_dropdown" data-toggle="modal" data-target="#myModal" href="white-papers/transformation_of_the_cookie/3.pdf#toolbar=0">Case Study 3</a><br>
</li>
</ul>
</li>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true" width="960" height="600">
<div class="modal-dialog" width="700px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<iframe id="iframe" src="" width="100%" height="600px" frameborder="0" allowtransparency="true"></iframe>
</div>
</div>
</div>
</div>
$(document).ready(function() {
$("#ai_dropdown").on('click', function(e) {
var option = $('a:selected', this).data('href');
console.log(option);
$('#iframe').attr('src', option);
});
});