/ Published in: jQuery
Find out how to retrieve a count of the total times users have bookmarked your web site or web page on Delicious by using JQuery and JSON.
The code is pretty simple and can be done in under 18 lines of code.
The code is pretty simple and can be done in under 18 lines of code.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script> <script type="text/javascript" src="jquery.md5.js"></script> <script type="text/javascript"> $(document).ready(function(){ url = "http://www.nealgrosskopf.com/tech/thread.asp?pid=17" $.ajax({ type: "GET", dataType: "jsonp", url: "http://feeds.delicious.com/v2/json/urlinfo/"+$.md5(url), success: function(data){ if (data.length > 0) { $("#delicious").text(data[0].total_posts); } } }); }); </script> p>Delicious: <span id="delicious"></span></p>
URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=34