hunzaboy/CSS-Checkbox-Library

Checkbox doesn't effect if I click the checkbox

ganyariya opened this issue · 2 comments

2018-08-03 9 31 16

2018-08-03 9 33 18

I'm making chrome extension, and I'd like to use css-checkbox-library.
However, how many times I click, this checkbox doesn't change color.

If table tr tag, checkbox does not effect?

Thank you very much, and sorry unwell English.

Looks like the <input id="ABC103B"> may be to blame... You didn't change the other value to match.
I've found the id needs to be the same value as the for in <label for="ckbx-style-12-1">

Since it looks like you chose ABC103B, you probably want:

<div class="ckbx-style-12">
    <input type="checkbox" id="ABC103B" value="1" name="ckbx-style-12" >
    <label for="ABC103B"></label>
</div>

However, the example-code's implication seems to be to the pattern ckbx-style-12-* like this:

<div class="ckbx-style-12">
    <input type="checkbox" id="ckbx-style-12-1" value="1" name="ckbx-style-12" >
    <label for="ckbx-style-12-1"></label>
</div>

Then for the next,

<div class="ckbx-style-12">
    <input type="checkbox" id="ckbx-style-12-2" value="1" name="ckbx-style-12" >
    <label for="ckbx-style-12-2"></label>
</div>

and so on.

I'm by no means a CSS expert, but as far as I can tell, id and for seem to link the click and the graphical change. If they're not the same, the click won't affect the graphic.

Thank you very much, I don't know that system!
I rewrote the sourcecode , it went well!