i have some jquery code to show iframe in modal window.
this code:
<script type="text/javascript">
$(document).ready(function() {
$("#modalDiv").dialog({
modal: true,
autoOpen: false,
height: '800',
width: '800',
draggable: false,
resizeable: false,
title: 'IFrame Modal Dialog'
});
$('#goToMyPage').click(
function() {
url = '/addnews.html';
$("#modalDiv").dialog("open");
$("#modalIFrame").attr('src',url);
return false;
});
});
</script>
HTML:
<a id="goToMyPage" href="#">Go to My Page</a>
<div id="modalDiv">
<iframe id="modalIFrame" width="100%" height="100%" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto" title="Dialog Title"></iframe>
</div>
i just can use for 1 link. this link:
url = '/addnews.html';
HTML:
<a id="goToMyPage" href="#">Go to My Page</a>
how i can use this code for 4-5 links?