var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutationRecord) {
console.log('Стили изменились!');
});
});
var target = document.getElementById('elementid');
observer.observe(target, { attributes : true, attributeFilter : ['style'] });
$("#myDiv").attrchange({
trackValues: true, // set to true so that the event object is updated with old & new values
callback: function(evnt) {
if(evnt.attributeName == "display") { // which attribute you want to watch for changes
if(evnt.newValue.search(/inline/i) == -1) {
// your code to execute goes here...
}
}
}
});
function sliderhomeShortcode( $attr ) {
ob_start();
get_template_part( 'sliderhome' );
return ob_get_clean();
}
add_shortcode( 'sliderhome', 'sliderhomeShortcode' );
.scrolloff {
pointer-events: none;
}
$(document).ready(function () {
$('#map1').addClass('scrolloff');
$('#overlay').on('click', function () {
$('#map1').removeClass('scrolloff');
});
$("#map1").mouseleave(function () {
$('#map1').addClass('scrolloff'); /
});
});
<section id="overlay" class="map">
<iframe id="map1" src="" width="1170" height="400" frameborder="0" style="border: 0"></iframe>
</section>