When you create your geojson layer, you can pass functions:
var myLayer = L.geoJson(d, {style: style, onEachFeature: onEachFeature, pointToLayer: pointToLayer}).addTo(map);
onEachFeature indicates which functions should be called depending on the event:
var onEachFeature = function onEachFeature(feature, layer) { layer.on({ mouseover: highlightFeature, mouseout: resetHighlight, click: zoomToFeature, pointToLayer: pointToLayer }); };
Example mouseover function:
function highlightFeature(e) { var layer = e.target; layer.setStyle({
You need to modify the code above to fit your design, but it shows you how you can hover over each function.
source share