php - JavaScript won't load when opening my webpage -


hello trying run code every time open webpage doesn't load , don't text echo php in file "money.php". if open console in browser , run code load. know how 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">

use this

    <script type="text/javascript">         $(function() {             $('[data-update]').each(function () {                 var self = $(this);                 var target = self.data('update');                 var refreshid = setinterval(function () {                     self.load(target);                 }, self.data('refresh-interval'));             });         });     </script> 

or this

    <script type="text/javascript">         $(document).ready(function() {             $('[data-update]').each(function () {                 var self = $(this);                 var target = self.data('update');                 var refreshid = setinterval(function () {                     self.load(target);                 }, self.data('refresh-interval'));             });         });     </script> 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -