I have a div in the center of a page that displays some content. When the user clicks a button, I make an AJAX call to get some new data to display in the div. I want to do the following to the DIV while I wait for the data from the AJAX call...
1) Change the opacity for all content in the div to 50%
2) Prevent any content that was clickable in the DIV from being clicked; I don't want to the user to do anything until AJAX call returns
3) Overlay a image in the center of the div that displays a loadingicon (assume I have an image named loading.gif
for this)
4) As soon as the AJAX call returns with data, return the opacity back to normal and remove any restrictions on clickability in the DIV, and turn off the loading image icon.
Are there any frameworks for this?