I know the topic was adressed alredy, but I am trying to come up with my own solution and I dont see why it doesnt work. Any advices will be appreciated.
HTML:
<section class="map" id="map">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d640.0242065261922!2d14.422763000000002!3d50.084474!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x470b94ec3c31c091%3A0x9ad699d70874bab9!2sAteli%C3%A9r+Triton!5e0!3m2!1scs!2scz!4v1427795367306" width="100%" height="500" frameborder="0" class="no-interact" style="border:0"></iframe>
CSS:
.no-interact {
pointer-events: none;
}
jQuery:
$(document).ready(function(){
$("#map").click(function(){
$("#map").removeClass("no-interact");
});
$("#map").mouseleave(function(){
$("#map").addClass("no-interact");
});
});
CSS class normaly works and disables scrolling of map, which is embedded on web page. But when I click on it, nothing happens. Is something wrong with the jquery code?