0

How can I add a loading image or div to this function?

the week1.php file is a table that is being filled with data from an external page using file_get_contents.

Sometimes it may take a few seconds before the table is displayed without anything changing on the page so I would like to add a loading bar/image/div with text letting the user know it is loading.

Thank you

<script type="text/javascript">
    function loadweek1() {
        $(function() {
            $('#DisplayDiv').load('schedule_tuesday/week1.php');
        });
    }
</script>
KJThaDon
  • 416
  • 3
  • 15

0 Answers0