JQuery, Button inside a form is not accessible : > This question is asked [here][1].

I'm trying to trigger the click event of a button inside a form using JQuery [Lib][2].

HTML:

        <form class="form-inline" action="">
            <button type="button" class="btn mr-3 btn-link transparent switchLang">${{index.keys.lng}}$</button>
            <button type="button" class="btn mr-3 btn-outline-light">${{index.keys.login}}$</button>
            <button type="button" class="btn btn-primary">${{index.keys.getStarted}}$</button>
        </form>
JS:

        $(".switchLang").on("click",function (e) {
            console.log("Clicked!")
        });


**The function above is not invoked!**

After research, I tried many solution but nothing's work. Like adding `e.preventDefault();` inside the function also remove `.click` and replaced with `.on` and so on.
But nothing works!

Thanks.
  [1]: https://stackoverflow.com/questions/16192190/jquery-click-event-not-triggered-on-button-inside-form
  [2]: https://jquery.com/