Just like the title says. Here is my code:
$('#somediv').change(function() {
if(this.checked) {
$('.leaflet-marker-pane').show(1);
}
else {
$('.leaflet-marker-pane').hide(1);
}
});
<input style="float: left;" type="checkbox" id="somediv" name="somediv">
This happens when the browser is refreshed. The content should not show up, because the checkbox is unchecked, but it is showing up.
Aucun commentaire:
Enregistrer un commentaire