JavaScript replace – Chrome not liking JS replace without using a RegEx.

I was trying to removed a parentheses character from a string. Was that why?

Also, you must must rap ) in [].

does not work in Chrome

galleryDiv_bg = galleryDiv_bg.replace(')','');

does work in chrome

galleryDiv_bg = galleryDiv_bg.replace(/[)]/g,'');

Thank you for reading!

It's only fair to share...Tweet about this on Twitter
Twitter
Share on Facebook
Facebook
Email this to someone
email

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.