I have created a custom page layout. In that custom page layout I have many HTML markup and controls like Dropdowns, hyperlinks (hrefs) etc. Clicking on hyperlink hides or shows a div. The HTML markup and controls shows up fine when I create a page from page layout. The issue I am having is the JavaScript to hide or show div is in external JS file, which I am referencing in the page layout as below:-
<SharePoint:ScriptLink name="~sitecollection/Style Library/Scripts/my.js" runat="server" />
But when I click on “hyperlinks (hrefs)” the script in external js file doesn’t fire. I also tried using
<script src="../../mysite/Style%20Library/Scripts/my.js"></script>
Any idea what’s wrong?