<div id="value">
10.00
<div id="text">hello!</div>
</div>
<script>
setInterval(function(){
$("#value").load("value.php #value");
}, 5000);
</script>
This is my content of my file.
How do i prevent script loading <div id="text"> too?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use load and then using load’s callback, simply remove the div you don’t need. Note that you should try to avoid using repeat IDs as it looks like the div you’re loading into has an ID of value and the file you’re loading from also has an Id of value.
jsFiddle example (note that this example uses jsFiddle’s AJAX echo API to simulate the call).