<link rel="stylesheet" href="https://alexandrugatea.bitbucket.io/templates/scss-framework/css/reset-frame.css">
<div class="relative ratio-half background-primary">
<img src="https://scontent-dfw5-1.cdninstagram.com/vp/4e6b15bac90f623ccf6e94de99407372/5C23CEAF/t51.2885-15/e35/35252658_483292288771161_2050478779372929024_n.jpg" class="absolute absolute-full image-fit">
<div class="absolute pos-center-center text-light padding-all-20">
<h1>
Checkbox.js
</h1>
</div>
</div>
<br>
<strong>Briefing</strong>
<br>
<p>
Please create a js functionality for <code>[type="checkbox"]</code>; <br><br>
<strong>Have in mind that:</strong>
</p>
<ul>
<li>input + label must have a common parent, <code>pretty-checkbox</code></li>
<li><code>inputs</code> must have <code>ID</code> attribute</li>
<li><code>labels</code> must have <code>FOR</code> attribute, matching input's ID</li>
<li>Match label's <code>FOR</code> attribute with matching <code>ID</code></li>
<li><hr></li>
<li> <strong>If's</strong></li>
<li>If the wrapper doesn't exist, wrap input and label in <code>pretty-checkbox</code></li>
<li>If inputs do not have ID, add incremental ID on each type="checkbox" in the page"</li>
<li>If labels do not have FOR attr, add it, matched with corresponsing input</li>
<li>If input is placed before label, and both have matching ID and FOR, no js is needed</li>
<li>If input is placed before label, but do not have matching ID and FOR, just add ID and FOR</li>
<li>If input is placed inside or after the label, check with <code>JS</code> wheter the input is checked or not and <code>add / remove</code>...