|
Project Information
Members
Featured
Downloads
Links
|
Half-Court Shot jsAppThis jsApp will fetch your Dribbble shots from across the court (aka Internets) and display them in a fancy little widgeto. It was a collab effort between mediaHACK <codes> and KomodoMedia <pretties>. If you have any questions, suggestions or issues let me know on twitter.
UsageIf you want to just use this and instantly go, copy the code directly below and replace the jersey name "Rogie" with your own. <link href="https://halfcourtshot.googlecode.com/svn/tags/101129.1100/style/half-court-shot.css" rel="stylesheet" type="text/css" />
<div id="dribbble"></div>
<script type="text/javascript" src = "https://halfcourtshot.googlecode.com/svn/tags/101129.1100/js/half-court-shot.jsapp.mh.min.js"></script>
<script type="text/javascript">var hcs = new HalfCourtShot({ jersey: "Rogie", shots: 4, goal: 'dribbble' });</script>The instances of a shot can be passed a settings object. If you don't give it a settings object then you'll just get the app appended to your HTML body tag. StylesThere is a default style sheet you can include. <link href="https://halfcourtshot.googlecode.com/svn/tags/101129.1100/style/half-court-shot.css" rel="stylesheet" /> SettingsA settings object with the following properties can be passed to the constructor
ExamplesBasic with no tweaking. The hcs object we create is arbitrary. You can call it whatever you want and create as many instances as you want. Just drop these script tags at the bottom of your page before the closing body tag. <script type="text/javascript" src = "https://halfcourtshot.googlecode.com/svn/tags/101129.1100/js/half-court-shot.jsapp.mh.min.js"></script> <script type="text/javascript">var hcs = new HalfCourtShot();</script>
This example is targeted at Rogie and an element where he wanted the app to be injected into <script type="text/javascript" src = "https://halfcourtshot.googlecode.com/svn/tags/101129.1100/js/half-court-shot.jsapp.mh.min.js"></script>
<script type="text/javascript">var hcs = new HalfCourtShot({ jersey: "Rogie", shots: 6, goal: "dribbble" });</script>Updates1.101129 - This was a minor release fix. The page has been updated to reflect using the new release. The fix was small enough most everyone already using HCS won't notice and can continue to use the Tag 1 if they choose. Thanks @paulrandall |