I want to add a active class so that whenever I click on a path it will be active until I click the other one. The minimal way of doing this would be appreciable. I already made this svg clickable using jquery.
. Here is my jquery code-
$(document).ready(function () {
$('#mySVG').load("bd-map.html", function () {
$("#bd-map").click(function (evt) {
switch (evt.target.id) {
case "panchagarh":
$('#info').load('info.html #panchagarh') //loading data from info.html
break;
case "bandarban":
$('#info').load('info.html #bandarban') //loading data from info.html
break;
case "comilla":
$('#info').load('info.html #comilla')
break;
case "sylhet":
$('#info').load('info.html #sylhet')
break;
}
});
});
})