I have the following checkbox with a class on it, for future use
.class{onClick: "doSomething()"}= check_box @var, :var
But there’s a problem. Let’s pretend |AAAA| is the buton, if i click on the ==.. it still triggers doSomething().
|AAAA| ====================
I tryied with
display: block
in css but it doesn’t work
Thanks
That’s because both the label and input area are enclosed in the
.class.Instead, specify via js that you only want the checkbox input to trigger your JS action, and not the label.
= check_box @var, :var, id: 'my-id'Then: