- blank page on loading custom JS in a MDS-enabled page
- custom JS script not loading
The first part is to use ScriptLink control in the master page, instead of using script tags directly. Specify "LoadAfterUI" attribute in order for the script to be loaded after the page is loaded in MDS.
The second part is to encapsulate all your custom JS in a single function and call it from your custom code. Your yourcustom.js file should look like this:
var DoSomething = function ()
// — Your custom JS here