I have a function in the index page where div
#atualiza
makes a load on home.php page and updates itself in x time.
index.php
var auto_refresh = setInterval (function()
{$('#atualiza').load('home.php');
cache:false;
return false;
},60000);
On the home.php page I have another script for users to put emoticons in posts.
home.php
<script type="text/javascript" src="js/jquery.emotions.js"></script>
<script type="text/javascript">
$(document).ready(function (){
$(".postagem").emotions();
});
</script>
The problem is the following when opening the index page for the first time everything works normal but when the #atualiza
div refreshes it does not read the script from the home.php page anymore. I heard that load does not read the ready
function of jQuery, I researched and found no solution.
How to make the page function home.php continue running? Thanks in advance!