سؤال

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?

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top