/jquery-bitcoin-link

JQuery Bitcoin Link plugin

Primary LanguageCoffeeScript

jquery.bitcoin-link.js

This library allows you to handle bitcoin links on your website.

Like it?

Send me some bitcoins: 14rqCoRQcyEaoaXjc8iLwa2s7HNHGjiEjp

Features

  • Style bitcoin links, only applies to href with "bitcion:..."
  • Provide a popup with information
  • Displays QR-Code
  • Bitcoin Address
  • Link to blockchain
  • Link to open with the bitcoin protocol

Example

Dependencies

The library depends on

How to Use

Include the dependencies into the head tag on your website.

<link rel="stylesheet" href="res/bitcoin-link.css"></link>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.qrcode.min.js"></script>
<script src="jquery.bitcoin-link.js"></script>

Add a bitcoin link anywhere

<a class="bitcoin-address" href="bitcoin:14rqCoRQcyEaoaXjc8iLwa2s7HNHGjiEjp">Styled Link</a>

Invoke the jQuery plugin to attach the behavior to the link

$('a').bitcoinLink()

Options

Add a link style with the class "bitcoin-address"

<a class="bitcoin-address" href="bitcoin:14rqCoRQcyEaoaXjc8iLwa2s7HNHGjiEjp">Link</a>

Set a bitcoin amount to display

<a data-amount="0.1" href="bitcoin:14rqCoRQcyEaoaXjc8iLwa2s7HNHGjiEjp">Link</a>

Set a USD amount to display (queries MtGox for conversion)

<a data-amount="$10" href="bitcoin:14rqCoRQcyEaoaXjc8iLwa2s7HNHGjiEjp">Link</a>

License MIT/BSD

Copyright (c) 2013, Florian Boesch pyalot@gmail.com http://codeflow.org/

  • MIT: see license/mit
  • BSD: see license/bsd