jQuery Shortify
jQuery plugin to shorten URL.
Getting Started
Include jquery.shortify.js after jquery.js.
<script src='jquery.js'></script> <script src='jquery.shortify.js'></script>Option
- service
googl: Use Google URL Shortener API. (default)bitly: Use Bit.ly API.- apikey : API Key for request authentication.
Example
HTML
<a class='someurl' href='http://www.example.com'>example.com</a>JavaScript
- Default :
$('.someurl').shortify();- Use Google URL Shortener API :
$('.someurl').shortify({ service: 'googl', apikey: 'YOUR GOO.GL API KEY' // optional });- Use Bitly API :
$('.someurl').shortify({ service: 'bitly', apikey: 'YOUR BIT.LY API KEY' // required });License
Released under the MIT License.