when click on button call function and display div mac_1, after that when click on run button click function and call three times, how to set if condtion by div id
$("#run").click(function() {$('#resultFrame').contents().find('html').html("<style>" + $('#css').val() + "</style>" + $("#html").val());
document.getElementById('resultFrame').contentWindow.eval($('#js').val());
else if
{
$('#resultFrame1').contents().find('html').html("<style>" + $('#css').val() + "</style>" + $("#html").val());
document.getElementById('resultFrame').contentWindow.eval($('#js').val());
}
else
{
$('#resultFrame3').contents().find('html').html("<style>" + $('#css').val() + "</style>" + $("#html").val());
document.getElementById('resultFrame').contentWindow.eval($('#js').val());
on click button call div
<div class="mac_1" id="mac_1" >
<iframe id="resultFrame" height="100%" width="100%">
<p>Your browser does not support iframes.</p>
</iframe>
</div>
<div class="ipad_1" id="ipad_1" style=" display: none;">
<iframe id="resultFrame1" height="100%" width="100%">
<p>Your browser does not support iframes.</p>
</iframe>
</div>
<div class="mob_1" id="mob_1" style=" display: none;">
<iframe id="resultFrame3" height="100%" width="100%">
<p>Your browser does not support iframes.</p>
</iframe>
</div>