I assume this is a simple problem, but I'm just studying ...
I have it:
var location = (jQuery.url.attr("host"))+(jQuery.url.attr("path"));
locationClean = location.replace('/',' ');
locationArray = locationClean.split(" ");
console.log(location);
console.log(locationClean);
console.log(locationArray);
And here is what I get in Firebug:
stormink.net/discussed/the-ideas-behind-my-redesign
stormink.net discussed/the-ideas-behind-my-redesign
["stormink.net", "discussed/the-ideas-behind-my-redesign"]
So, for some reason, the replacement occurs only once? Do I need to use Regex instead of "/ g" to repeat it? And if so, how would I specify "/" in Regex? (I understand very little how to use Regex).
Thanks to everyone.
source
share