At the moment I'm replacing spaces with hyphens
$( "#" + arrVals.join(',#').replace(/ /g,"-") ).show();
How can I also replace / with -
Thanks very much for your time!
You can just adjust your .replace() regex to check for either a space or a / character, like this:
$( "#" + arrVals.join(',#').replace(/ |\//g,"-") ).show();