Load only specified javascript

How can I determine which javascripts to be loaded by pages? I mean I have multiple pages and javascripts. Some javascripts can only be loaded by certain pages and CAN NOT be loaded by other pages.

Thanks.

Any idea? It's really important for me.

Without any examples, it's going to be hard to really help.

However, the only thing I can think of is that you will need to have your pages that should not load certain scripts will need to be independent pages from any of the others. So they should not have any linked items with other pages so that scripts don't carry through. Which means you would probably have to recreate like items rather then link them between pages. I haven't linked anything as of yet so I don't really know how that all works.

For Bootstrap, you need to have the minimum of the JQuery and Bootstrap scripts. Any other script is added by you one way or another.

Saj

Right now you can't control which files are loaded by page. We will work on this in the next releases. But for now you can do a workaround. For example you can add id attributes to your <body> and do something like this in your js files:

$('#id-of-body').each(function(){
   // your code goes here
});

This way your code will get executed only on the specified page.

It helps. Thanks.