<div style="height: 2000px; width: 400px; margin: 0 auto;" id="map-wrap">
<iframe style="pointer-events: none;" src="https://yandex.ru/map-widget/v1/?um=constructor%3Ac94e45d7f53bf7d35e1ae3e4946b0966305666753488de23effbc47e7d2d337f&lang=ru_RU&scroll=false&source=constructor" width="100%" height="100%" frameborder="0"></iframe>
</div>
document.addEventListener('click', function(e) {
var map = document.querySelector('#map-wrap iframe')
if(e.target.id === 'map-wrap') {
map.style.pointerEvents = 'all'
} else {
map.style.pointerEvents = 'none'
}
})
if( window.innerWidth <= 640 ) {
var mobileScript = document.createElement('script')
mobileScript.src = 'http://example.com/mobilescript.js'
var mobileStyles = document.createElement('link')
mobileStyles.src = 'http://example.com/mobilestyle.css'
mobileStyles.rel = 'stylesheet'
mobileStyles.type = 'text/css'
document.head.appendChild(mobileScript)
document.head.appendChild(mobileStyles)
}
var obj = JSON.parse(yourResponseTextFromServer)
document.querySelector('#somediv').innerHTML = obj.data.text
filter: blur(5px)
.header {
....
}
.header::before, .header::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.header::before {
background: rgba(255, 255, 255, 0.6);
z-index: 2;
}
.header::after {
filter: blur(5px);
-webkit-filter: blur(5px);
z-index: 3;
}
.overlay {
background: rgba(0, 0, 0, 0.5)
}
body {
position: relative;
}
body::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%; height: 100%;
background: rgba(0, 0, 0, 0.5)
}
if( !document.querySelectorAll('.error-block').length ) {
window.open("http://site.com/thx-page", "_blank");
window.location.href = 'http://site.com/';
}