New to jQuery & JavaScript.
I have
var x = location.pathname;
(ex: /abc/collection/tea/green/index.php)
Like this I have various pathname retrieved using location.pathname
.
I want to replace all "/" in the pathname with ":" (I mean a / with a :) and also I don't want the .php which is at the end. Any help please.