How i can add the checkbox and label css click event inside a DIV? the below codes not works for me, if i remove "" its working perfect. Why is happening?
HTML
<div id="wrapper">
<input name="" type="checkbox" value="" id="hub" class="hub" style="display:none;"/>
<label for="hub" class="hub2"></label>
</div>
<div class="slide">
the contents
</div>
CSS
.slide{
background:red;
}
input[type=checkbox].hub:checked ~ .slide {
background:green !important;
}