I'm having a strange problem with Javascript and SharePoint Online.
I've created a page that contains a script editor webpart with some JavaScript code (calls a few REST services to show a list of available document libraries on that site). When my page is in EDIT mode the code is working like it should. In normal mode the code is only working when I enter the url like this: https://server/site/SitePages/Overzicht.aspx?tag=ICT
When you click on an item and then you go back the url becomes: https://server/site/_layouts/15/start.aspx#/SitePages/Overzicht.aspx?tag=ICT And then it no longer works. It seems that the code in the script editor webpart is not being executed.
Anyone have a solution for this problem or can explain me what is happening here?
Code in script editor:
<script src="https://server/site/SiteAssets/jquery-2.1.3.min.js"></script>
<script src="https://studenthowestserver/site/SiteAssets/Howest.SP.ListHelper.js"></script>
<div id="documentlibraries"></div>