I want to delay jQuery ajax successful function
问题 I want to let user wait for 2 seconds before the HTML inside the block changes. Can you help me to set some time so that ajax request was not so fast and I had time to show some animation I tried to set timeout but it is not working jQuery(document).ready( function($) { $(document).on('click', '#wp-request', function(event){ event.preventDefault(); var path = myScript.pluginsUrl + '/simple/widget-final.php'; $.ajax({ type : 'POST', url: path, cache: false, success : function(data){ var