Here is the working script for Switch Case In Jquery With Id name :
$(".btn").click(function () {
switch ($(this).attr('id')) {
case 'id1':
{
//query
break;
}
case 'id2':
{
//query
break;
}
}
});
$(".btn").click(function () {
switch ($(this).attr('id')) {
case 'id1':
{
//query
break;
}
case 'id2':
{
//query
break;
}
}
});
No comments:
Post a Comment