Any custom JavaScript code running inside layouts needs to wait for the layout to finish rendering, to do that use the following snippet: Library code are common functions that can be reused in ...