modalToggle.hash add check contains slash

modals.js add slash check, otherwise they will perform error