Question

Can anyone help me understand why I'm not receiving the alerts on my switch case?

JSFIDDLE

$(".system-menu li").click(function(){

switch ($(this).attr("data-action")) {

    case "Info": 
    alert("Info");
    break;

    case "Contact": 
    alert("Contact");
    break;

    case "Help": 
    alert("Help"); 
    break;
}

});

I'm trying to trigger events for each different case but maybe there's a better way to do this?

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top