문제

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