I am trying to run this code but every time I open my webpage it doesn't load and I don't get the text I echo with PHP in the file "money.php". But if I open the console in my browser and run the code it does load. How can I fix this?
<script type="text/javascript">
$('[data-update]').each(function() {
var self = $(this);
var target = self.data('update');
var refreshId = setInterval(function() { self.load(target); }, self.data('refresh-interval'));
});
</script>
<div data-update="money.php" data-refresh-interval="500">