Rearrange order of operations in skipSong() to make button skinning work better, and get the new song in the subsequent listsongs call

This commit is contained in:
Junior 2024-06-01 12:55:48 -04:00
parent 7ddbc11d27
commit 2f7735f669

View File

@ -358,8 +358,10 @@ function skipSong (callingElement) {
$.ajax({ $.ajax({
url: 'ajax/ajax_skipsong.php', url: 'ajax/ajax_skipsong.php',
success: function (data, stat, jqo) { success: function (data, stat, jqo) {
callingElement.removeClass("buttonactive"); setTimeout(function() {
setTimeout(function() { getSongList(); }, 250); callingElement.removeClass("buttonactive");
getSongList();
}, 250);
}, },
error: function(jqo, stat, err) { error: function(jqo, stat, err) {
callingElement.removeClass("buttonactive"); callingElement.removeClass("buttonactive");