on Parsing removed (allow onClick)

It is painfully obvious that BootStrap Studio has some parser to check if your Key starts with the word "on" and ignores/removes it.

I feel like I bought a car that can't turn left. I have to workaround this. Since I have a locked component at the top I would need to convert 90% of the page to code which makes using BootStrap Studio pointless. I can't use IDs in js code instead of onClick because I have the code linked to other pages in which it needs those pages are not all doing the same thing. I could solve this be just including js files that run specific code on each page but BootStrap Studio forces all you js file to be included on each page.

I have no good options just like buying a brand new car that can't turn left. I would need to make wide right turns that loop around.

You can include js scripts on individual pages via the custom code component. Never heard of BSS stripping code. Can you provide an example of your page, or what you're trying to do. Hard to offer help when all you post is a big rant.

@chris_

You need to learn to code smarter. You should have 1 custom JS file for yourself and all "your" custom JS code should go in it. Yes it will be on all pages because that's the way things are done today.

If you have multiple pages with the same ID's across pages and they do different things then you create a test and identify the (each) page.

For example:

index.html

<body id="mainpage">
    Smart Navbar...
  <div id="div1">
      Blah...
  </div>
</body>

page2.html

<body id="page2">
    Smart Navbar...
  <div id="div1">
      Blah...
  </div>
</body>

page3.html

<body id="page3">
    Smart Navbar...
  <div id="div1">
      Blah...
  </div>
</body>

Then you can code in your 1 JS file

$(function() {
    $("#div1").on("click", function(){
        var $this = $("body").attr("id");
        if ($this == "mainpage") {
            alert("mainpage");
        } else if ($this == "page2") {
            alert("page2");
        } else if ($this == "page3") {
            alert("page3");
        }
    });
});

Saj

@Printninja Go to the attribute of anything and add a key for "onClick". basically any key that starts with the word "on" will not be showed in the html or when you export or preview the page.

My main rant was that inorder for that to happen someone needed to write code to detect that and remove it. I'm talking about the developers of BSS not my site.

The problem with including the JS files is they are already included by the BSS.

@Saj

Including all you JS on every page even though some of that code is not being use. That is not how things are done today except by BSS which forces it.

Since that div does not appear on every page it breaks the code.

I was trying to make a feature request. I was not looking for a three right turns solutions to my problem of not being able to go left.