diff --git a/js/main.js b/js/main.js index 972ec4f..e80a5a7 100644 --- a/js/main.js +++ b/js/main.js @@ -36,7 +36,9 @@ $(function(){ url: baseUrl + '/stations/' + data[station]["id"], method: 'DELETE' }).done(function(){ - alert('delete row pls'); + if ($('li.nav-favorites').hasClass('active')){ + $( "tr[data-id='"+data[station]["stationid"]+"']" ).remove(); + }; }); }; }; @@ -152,7 +154,7 @@ $(function(){ radio_query(2); break; case 2: - $('li.nav-favorite').addClass('active'); + $('li.nav-favorites').addClass('active'); action_load_favorites(); break; }