jQuery-Mapael icon indicating copy to clipboard operation
jQuery-Mapael copied to clipboard

functions inside mapael options

Open SoBerry29 opened this issue 7 years ago • 0 comments

Hi i'm new using mapael, I have a question or issue, i'm trying to make the css Class property dinamic according to a flag in a DB in mysql to make to area clickable or not besides change the color to show if the area is available or not, i don't know if there is a way i can make CSSCLASS dinamic by the response of an ajax function

here is an example of my code

function check:(id){
    var param ={id:id}
$.ajax({
    data:param,
    url: "get_available.php",
    type: "POST",        
    success: function (result) {             
        return result
        
    },
    error: function (result) {
        alert("error");
    }
});
}

areas:{ "country-5": { href: "javascript:void(0)",
eventHandlers: { click: function(e, id, mapElem) {ver_modal(id)} },
cssClass:check(5) }, }

SoBerry29 avatar Feb 20 '19 20:02 SoBerry29