Skip to content

Instantly share code, notes, and snippets.

@gterrill
Created August 16, 2010 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gterrill/526521 to your computer and use it in GitHub Desktop.
Save gterrill/526521 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
// <![CDATA[
Forexd.init("{{ shop.currency }}");
jQuery(document).ready(function($) {
$('#site-currency').val(Forexd.currency()).show();
$('#site-currency').change(function() {
Forexd.currency($(this).val()); // save new currency
document.location.href = document.location.href; // reload the page
});
$('.forexd').each(function() {
$(this).text(Forexd.forex($(this).text())).show();
})
$('.forexd-currency').text(Forexd.currency()).show();
});
// ]]>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment