JQuery Library to create short link
Official library
Create safe short links from your web site. The current version is 1.0.
if you are looking for an easy way to add a short link to pages on your website, or a Javascript widget to shorten links, see the Tools section.
Download
You can download the JQuery library from here.
Example
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="/static/download/jsafe.mn.js" type="text/javascript"></script>
<script type="text/javascript">
$.safeLinks.shorten("http://www.reviews-web-hosting.com/", function(original, short) {
$('#result').html($('#result').html() + "Short: " + short + "\n");
}, function(original, message) {
alert("Error while shortening " + original + ": " + message);
});
$.safeLinks.expand("http://safe.mn/d", function(original, long) {
$('#result').html($('#result').html() + "Long: " + long + "\n");
}, function(original, message) {
alert("Error while expanding " + original + ": " + message);
});
$.safeLinks.info("http://safe.mn/d", function(original, data) {
$('#result').html($('#result').html() + "Clicks: " + data.clicks + "\n");
}, function(original, message) {
alert("No info for " + original + ": " + message);
});
</script>
Output
