I'm using Google map to get distance and time between two locations.
this works fine...
however, I would like to replace some texts/words that has been spit out on my page from google map api with my own texts/words.
for example: I would like to replace the about
with ETA:
This is my javascript code to replace the word:
<script>
function myFunction() {
var str = document.getElementsByClassName("adp-summary").innerHTML;
var res = str.replace("about", "ETA: ");
document.getElementsByClassName("adp-summary").innerHTML = res;
}
</script>
but unfortunately this doesn't do anything and it doesn't replace the word about with ETA:.
Here is my entire code:
http://jsfiddle.net/dvw37ktu/1/
Could someone please advise on this issue?
Thanks in advance.