I have a group of radio buttons with the same name, but different values. I'd like to do something like:
$("#langs").on("change", "[name=locale]", myfunction);
This works, but when I click on a new radio button myfunction gets called twice: once for the "old" radio button that is automatically getting unchecked, and once for the new one I'm clicking on.
changing onchange to onclick is not a solution, because I use it with jquery-mobile and it wraps the inputs with label, so the label is getting clicked, not the input.