I need to stylize some checkboxes through jquery, but I don't want to use plugins. I just need a simple jQuery code.
I thought to use a simple list with css style.
<ul id="list">
<li class="selected"><a id="1" href="#">1</a></li>
<li><a id="2" href="#">2</a></li>
<li><a id="3" href="#">3</a></li>
</ul>
In the same time i put in the code the input checkboxes hidden by css:
<input type="checkbox" id="1" name="rivista_numero" value="1" checked />
<input type="checkbox" id="2" name="rivista_numero" value="2" />
<input type="checkbox" id="3" name="rivista_numero" value="3" />
With jquery if I click to the " link the parent li element will receive the "selected" class and the checkbox with the same ID will be checked.
Do you think that this could be a good solution? Is it possible to achieve this result with jQuery?