Widgets
The JavaScript widgets have been created to make it easier to pull relevant information from our site into yours. The data on joind.in belongs to the community and we hope this makes it simple to use it as you wish!
About the Widgets
We've started very simple, and the widgets display the current rating and number of comments for a talk. Here's an example:It simply shows how many comments there are in total, the current overall rating, and links to the site for people to see the comments or join in.
Start Using Widgets
NOTE: This code relies on jQuery, so if your site doesn't already include this, you'll need the following line in your <head> tag:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
Put the following into your code, with [talk-id] replaced by the talk whose data you want to show:
<script src="//joind.in/widget/widget.php"></script>
<script>
joindin.draw([talk-id]);
</script>
The above will put the widget exactly where you put your script tag, but for more control you can also have it replace a named div, like this:
<div id="placeholder"></div>
<script>
joindin.draw(3214, "placeholder");
</script>
How It Works
The best explanation is for you to read the JavaScript generated by the /widget/widgets.php file! Basically, it is possible to call the v2 API in a JSONP manner; request a format of JSON and send a callback parameter along with your request, and you will get a response which is JSON wrapped in a callback that your client can use cross-domain.



