Similar to this question using a Bootstrap Button I am looking to add a tooltip to appear when my Bootstrap Switch is disabled.
I have this JSFiddle that disables the Switch when the map reaches a certain zoom as per the code below. I now want to add a tooltip that tells the user to zoom in when the Switch is disabled.
map.on('zoomend', function (e) {
// Add/remove layers based on zoom level
if (map.getZoom()>=5) {
$("[name='my-checkbox2']").bootstrapSwitch('disabled',false);
}
else if (map.getZoom()<5) {
$("[name='my-checkbox2']").bootstrapSwitch('disabled',true);
}
});