Question about the Layout CSS/Javascript section

On each page, when you open up BB on the left dropdown, there is an option titled Layout CSS/Javascript. Can I get some insight how this section in particular the JS tab work? Do I enter JS with or without <script> here?

I keep getting users putting tracking codes for various services in here and they always choke BB and I have to go clean up. Thanks!

Hi, in this CSS/JS area you’ll insert custom code to be applied to the current layout only.
If you need your custom code to apply site wide, you’ll set it in BB Tools > Global settings > CSS/JS tabs

Don’t insert <script> tag here, it’s managed by BB.
Here’s the syntax to use with jQuery:

jQuery(document).ready(function($) {
       custom JS here

The script html tag … is a html tag

You can only add js to the js box as it gets added to the other layout js

Thank you so much for clarifying there can only be JS in there. That’s exactly what I needed to know.

@pross can you clarify what you mean by it gets added to the other layout js?

yes, if you page has modules on it, then the JS for those modules gets added to the layout js file, also the global js gets added there and anything you add in the layout js box… all combined into one JS file, no html :wink:

Thank you. That explains a lot. Appreciate it.