About this question
I am currently developing a web-based application in which users can submit their forms to search for information. To enhance the experience of the users, I want to execute a particular feature where a loading message is displayed when the form is submitted, and it should remain visible until the search results are returned. To avoid the loading message from appearing too briefly in case of a very fast response, I also want to ensure that it should be displayed for at least 2 seconds. How can I approach this task by using jQuery and Settimeout?

