Hello
I have scripts which refreshes my file after few seconds. but i want
it should refreshes only when that file is got new data(new tweets)
index.php
<script>
$(document).ready(function() {
$("#responsecontainer").load("index-tweet.php");
var refreshId = setInterval(function() {
$("#responsecontainer").load('index-tweet.php?randval='+
Math.random());
}, 8000);
});
</script>
index-tweet.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Tweet! Put Twitter on your site with this simple,
unobtrusive jQuery widget</title>
<link href="jquery.tweet.css" media="all" rel="stylesheet"
type="text/css"/>
<link href="jquery.tweet.query.css" media="all" rel="stylesheet"
type="text/css"/>
<!-- <script language="javascript" src="http://ajax.googleapis.com/
ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></script>
-->
<script language="javascript" src="jquery.tweet.js" type="text/
javascript"></script>
<script type='text/javascript'>
jQuery(document).ready(function($) {
$(".tweet").tweet({
join_text: "auto",
username: "23nasscompc",
avatar_size: 48,
count: 3,
auto_join_text_default: "we said,",
auto_join_text_ed: "we",
auto_join_text_ing: "we were",
auto_join_text_reply: "we replied",
auto_join_text_url: "we were checking out",
loading_text: "loading tweets..."
});
$("#query").tweet({
avatar_size: 32,
count: 3,
query: "%Halloween ",
loading_text: "searching twitter..."
});
})
</script>
</head>
<body>
<div class='container'>
can anyone please tell me how can i do that?
<div id="query" class='query'></div>
</div>
</body>
</html>