I have next and previous button on my web page. They get next and previous page on the available middle portion. The response of the new page comes from the server.
If user clicks on the button multiple times e.g. 5 times then the 4 pages are skipped and 5th one is loaded. What I want to do is disabled all the click events when the 1st is not completed.
I know I can disable the buttons when first click has occurred. But I am not liking to write a logic to enabling/disabling the buttons. Is there any code statement provided in JavaScript which works a bit smarter way.