/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Envuelve el simbolo del euro en un <sup>, para mostrarlo correctamente (superindice) * tanto en listado de productos como en ficha de producto */ function initOptimiceCurrency(){ jQuery('.products-grid .price, .product-shop .price').each(function(){ var h = jQuery(this).html(); h = jQuery.trim(h); var c = h.charAt(h.length-1); var repl = '<sup>'+c+'</sup>'; h = h.replace(' ', ''); h = h.replace('\€',repl); jQuery(this).html(h); }); }
Comments
