Answer the question
In order to leave comments, you need to log in
How to disable js execution with saving in cookies?
Good day everyone. There is js that sends an event when hovering over a block in a Google map:
$(".appartment").each(function(){
var ap_id = $(this).attr("ap_id");
$(this).on("mouseenter", function() {
google.maps.event.trigger(Marker[ap_id], "click");
});
});
Answer the question
In order to leave comments, you need to log in
$('input[type="checkbox"]').on('change', function() {
if ($(this).prop('checked')) {
$(".appartment").off('mouseenter');
$.cookie('map-trigger-status', 'off'); // Библиотека для работы с cookies: https://github.com/carhartl/jquery-cookie
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question