{{ "pforex.js" | asset_url | script_tag }}
<script src="/path/to/pforex.js"></script>
<select pforex-selector >
<option val="USD">USD</option>
<option val="EUR">EUR</option>
<option val="GBP">GBP</option>
<option val="JPY">JPY</option>
</select>
Pforex.set("USD")
Pforex.get()
<pforex price="100" />
$1
<pforex price="399" />
$3.99
<pforex price="500000" />
$5,000
<pforex price="500000" show-currency="true" />
$5,000 USD
<pforex price="500000" show-symbol="false" />
5,000
<pforex show-symbol="false" show-currency="true" />
USD
<pforex price="10000" re="(.+?) GIFTCARD">N GIFTCARD</pforex>
$100 GIFTCARD
<span data-pforex-price="100" data-pforex-showcurrency="true" class="money">
</span>
<span
data-pforex-price="100"
data-pforex-re="\((.+?)\)"
class="money"
>
SPECIAL THING ($1)
</span>
<pforex id="dynamic-display" price="100" />
<button id="clicker" >CLICK ME</button>
<script>
var button = document.querySelector('#clicker');
var display = document.querySelector('#dynamic-display');
button.addEventListener( 'click', function () {
display.setAttribute('price',
(parseInt(display.getAttribute('price'))+1313)
);
});
</script>