Content not styling

Content not styling

Hi

If I try and create extra pages to my app, such as homepage, when the user clicks on the 'Search' button on the home page, when the script(next page) loads, it doesn't style up the list views. It only styles up when you refresh the page. 

Is this something down to how and when the script loads. Is this JS loading too quickly before the page content is available and thats why it needs to refresh. 

I tried exporting the JS code into a separate JS file and injecting it on page load but thats not working either. 
But still think its loading up before the page is.

Can i attach the JS file to a button/link or am i missing another trick?

'Im pretty sure that i am using a multi-page template. All of my pages are nested inside one html document. Is it best if i separated the content out and created a new doc for the listview pages'.
Also, I stripped out the code, and all the files I have are index.html that uses 2 script files located in a JS folder/ and a CSS Folder which has one file.

Thank you for any help yo can give me.