Версия 11:04, 27 октября 2015 | | Версия 12:09, 27 октября 2015 |
Строка 1: | | Строка 1: |
| | + | function addPopupWindow() { |
| | + | $('body').append( |
| | + | '<div id="popupWindow"><table><tr><td style="vertical-align: middle;">'+ |
| | + | '<div id="popupOverlay"></div>'+ |
| | + | '<div id="popupWrapper">'+ |
| | + | '<div id="popupContent"></div>'+ |
| | + | '<img src="//wiki.gcdn.co/images/b/bd/Close.png" class="closeBtn">'+ |
| | + | '</div>'+ |
| | + | '</td></tr></table></div>'+ |
| | + | ); |
| | + | } |
| | + | |
| $(document).ready(function() { | | | $(document).ready(function() { |
| | + | addPopupWindow(); |
| $('.Model3DViewer').click(function(){ | | | $('.Model3DViewer').click(function(){ |
? | document.getElementById("popupImageWrapper").innerHTML = '<iframe width="'+(document.documentElement.clientWidth-200)+'px" height="'+(document.documentElement.clientHeight-200)+'px" id="Model3D" src="https://sketchfab.com/models/'+$(this).children('div.Model3D').text()+'/embed?autostart=1&preload=1" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>'; | | + | document.getElementById("popupContent").innerHTML = '<iframe width="'+(document.documentElement.clientWidth-200)+'px" height="'+(document.documentElement.clientHeight-200)+'px" id="Model3D" src="https://sketchfab.com/models/'+$(this).children('div.Model3D').text()+'/embed?autostart=1&preload=1" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>'; |
? | $('#popupImageWrapper').show(); | | + | $('#popupWrapper').show(); |
? | $('#popupImageWindow').show(); | | + | $('#popupWindow').show(); |
| }); | | | }); |
| }); | | | }); |
Версия 12:09, 27 октября 2015
function addPopupWindow() {
$('body').append(
'<div id="popupWindow"><table><tr><td style="vertical-align: middle;">'+
'<div id="popupOverlay"></div>'+
'<div id="popupWrapper">'+
'<div id="popupContent"></div>'+
'<img src="//wiki.gcdn.co/images/b/bd/Close.png" class="closeBtn">'+
'</div>'+
'</td></tr></table></div>'+
);
}
$(document).ready(function() {
addPopupWindow();
$('.Model3DViewer').click(function(){
document.getElementById("popupContent").innerHTML = '<iframe width="'+(document.documentElement.clientWidth-200)+'px" height="'+(document.documentElement.clientHeight-200)+'px" id="Model3D" src="https://sketchfab.com/models/'+$(this).children('div.Model3D').text()+'/embed?autostart=1&preload=1" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
$('#popupWrapper').show();
$('#popupWindow').show();
});
});