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:
		
							parent
							
								
									7ddbc11d27
								
							
						
					
					
						commit
						2f7735f669
					
				| 
						 | 
					@ -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");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user