Here is my code:
setInterval(function(){
$('#elementtochange').load('ajax/getdata.php #elementtoget');
}, 500)
setInterval(function(){
$('#ajaxplayers').attr('value').load('ajax/getdata.php #players');
}, 500)
I know you can use the jquery function .load() to load elements from an external php file, which I do from the first function in the code in an interval.
Now I want to do the same thing but instead of loading it into an element I want to load it into an atribute 'value' and change it dynamically with .load() and in the external php file load it from my mysql database. But the code as i wrote it doesn't work so does anyone have a solution for this?
Aucun commentaire:
Enregistrer un commentaire