开发者

Jquery text replace for specific characters on entire site

开发者 https://www.devze.com 2023-02-07 09:01 出处:网络
Basically what I need to do is replace question marks throughout the copy of an entire ecommerce site that has TONS of product descriptions.

Basically what I need to do is replace question marks throughout the copy of an entire ecommerce site that has TONS of product descriptions.

The problem that I am getting is that quote marks are showing up as the diamond question marks on Apple. I was wondering if there was a simple jQuery .text() function I could do to search and destroy the "/' and insert the proper html code for the quotation marks.

Also, would this be really memory inte开发者_运维知识库nse to do on page load?

Thanks for all your thoughts and recommendations!


I know @Matt Ball may disagree with this solution as it doesn't specifically address the real problem but just scoots it off to the side, but since the back-end php business was built by another group and I can't change their work this is a clean work around… visually.

var f = $("body"); 
f.html( f.html().replace(/"/g,"”"));

Pretty simple really. Just in case anyone was curious.

Thanks for trying everyone!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号