I have read through multiple posts regarding reloading the content of a div through the use of Jquery. I have a Dashboard with multiple floating divs that rotates data calculated in php scripts.
ie. i have a php script that calculates data and i include this in a div which then scrolls through the content (see below code)
The problem i have with the code examples available online is that it doesnt show my php content.
How can i go about reloading the php pages in the div and still keep my slideshow going?
Thanks in advance
<div class="topdiv_1">
<div id="topdiv_1_slideshow">
<div align="center">
<img src="images/elements/project.png" class="pull-left" alt="" height="100px" style="padding-left: 10px; margin-top: 50px;">
<h1 style="font-size: 90px; color: #ffffff; font-weight: bold"><?php include_once('topdiv_1_stat1.php') ?></h1>
<h6 style="font-size: 14px; color: #ffffff; font-weight: bold">Project Hours Total</h6>
</div>
<div align="center">
<img src="images/elements/project.png" class="pull-left" alt="" height="100px"
style="padding-left: 10px; margin-top: 50px;">
<h1 style="font-size: 90px; color: #ffffff; font-weight: bold"><?php include_once('topdiv_1_stat2.php') ?></h1>
<h6 style="font-size: 14px; color: #ffffff; font-weight: bold">Project Hours System Center</h6>
</div>
<div align="center">
<img src="images/elements/project.png" class="pull-left" alt="" height="100px"
style="padding-left: 10px; margin-top: 50px;">
<h1 style="font-size: 90px; color: #ffffff; font-weight: bold"><?php include_once('topdiv_1_stat3.php') ?></h1>
<h6 style="font-size: 14px; color: #ffffff; font-weight: bold">Project Hours Service Center</h6>
</div>
</div>
</div>
UPDATE:
I have tried adding this code to the div but now it throws away the formatting of the returned value:
<div id="topdiv_1_slideshow">
<div align="center" id="1">
<img src="images/elements/project.png" class="pull-left" alt="" height="100px" style="padding-left: 10px; margin-top: 50px;">
<h1 style="font-size: 90px; color: #ffffff; font-weight: bold"><?php /*include_once('topdiv_1_stat1.php') */?>
<script>
$(function(){
$("#1").load("topdiv_1_stat1.php");
});
</script>
</h1>
<h6 style="font-size: 14px; color: #ffffff; font-weight: bold">Project Hours Total</h6>
</div>