Getting back custom modal on page change by adding missing href attributes on links