Morning,
I need to replace some characters in jQuery with different characters due to the way images are displayed on the site. I need to replace the & and the / with an _
I currently have, how would i do the / ?
$('#lnkProdImage').attr("href", "http://img.website.com/500/" + res.sku.replace(/&/g, '_').replace(/[\s]/g, '_') + ".jpg");
Many thanks in advance.
1 Answer