Take out decimal for Yen Currency

/ Published in: jQuery
Save to your folder(s)

Working on an ecommerce site I found out from our Japanese distrubutors that they don't have a decimal for the currency since yen doesn't deal in change. 1 yen is a fraction of a cent anyway!

This code looks for the Yen since within a and if it has the yen which is uFFE5 to a browser, it replace the .00 with nothing.

Copy this code and paste it in your HTML
  1. jQuery(".price:contains('\uFFE5')").html(jQuery(".price").html().replace(".00", ""));

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.