I’ve taken inspiration from an awesome jquery plugin from coda and developed some jquery code that goes and fetches realtime twitter reactions.
To begin, download the source and include the following scripts in your page:
<script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript" src="js/jquery.page-realtime-twitter-reactions.js"></script>
Next, add a “page-realtime-reactions” div element to your page, wherever you want the realtime reactions to appear:
<div id="page-realtime-reactions"></div>
Finally, add the following jquery code, changing the query parameter to suit your needs:
<script type="text/javascript">
$(document).ready(function() {
$("#page-realtime-reactions").getPageRealtimeReactions({
query: "Realtime Twitter Reactions using JQuery OR http://blog.niteviva.com/development/realtime-twitter-reactions-using-jquery OR http://tinyurl.com/yfahkgd",
numTweets: 5,
loaderText: "Loading ...",
slideIn: true,
showHeading: false
});
});
</script>
Hope you enjoy playing with this neat little plugin, and why not tweet about it (comments are so 1990!), and be amazed when you see your tweet appear above
Tags: Development, jquery, twitter