Hi Victor, thanks a lot for answer. It seems to be work but.... On load, the value getted is 'false'. If I switch my toogle on 'on' position, I obtain 'false' to. And if I switch back my toogle on the 'off' position, I obtain 'true' (when the toggle is positionned on the 'No' position)....
EDIT : I think it's due to a wrong test formula, I try this (in the beginnng of the test sentence) :
$('span[aria-labelledby="field_2ltf7_label"].attr('aria-checked')').change(function () {
...but it doesn't work
EDIT2 : If done some searchs on Google.... As I understand, it is not possible to have an 'onChange' listener for an attribute change.The right method will be a MutationObserver.....
The code I gave works perfectly in my development environment. All you had to do is change the label name. I explained earlier that a toggle is not a standard form input. The toggle is a single hidden checkbox field. The visible interactive part is a compilation of span elements. The part that you click on is a span's before pseudo element. They do not fire a change event. You could try on("click", function(){});
Without knowing how you you wrote and applied your code, it's not possible for me to help you further. Perhaps you should think about hiring a developer to take a look at your site and fix this for you.
Please login or Register to submit your answer