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?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top