forum

Home / DeveloperSection / Forums / How to replace character in jquery?

How to replace character in jquery?

Anonymous User179706-Oct-2014
My Google Map is not reading the values from jquery thus displaying an empty div of where the markers/places should show. But when I add the values in manually from how it is read from the textbox it does display the map with all the markers. So I guessed that the "\" character is the problem. I have tried replacing it with a blank space, but it's not working.
this is code:
var marker = $('#txtMarkers').val();
var markers = marker.replace(/\\/gi, " ");

but it is not removing the "\" character. What can I do to get this right? ...I'm not used to working in javascript/jqeury and is fairly new to this, any help or suggestions will be appreciated.


Updated on 06-Oct-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By