Posted By

cpres on 10/08/11


Tagged

regex replace jquery yen


Versions (?)

Take out decimal for Yen Currency


 / Published in: jQuery
 

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.

  1. jQuery(".price:contains('\uFFE5')").html(jQuery(".price").html().replace(".00", ""));

Report this snippet  

You need to login to post a comment.