Created
February 4, 2011 01:36
-
-
Save joemsak/810589 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="some-float-clearing-class"> | |
<label><input type="checkbox" /> Some Label</label> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('label input').change(function(){ | |
$(this).parent().toggleClass('selected') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label { | |
display:block; | |
width: 150px; | |
float: left; | |
font-size: 13px; | |
line-height: 16px; | |
margin: 0 0 5px 20px; | |
padding: 5px; | |
cursor:pointer; | |
border-radius:3px; | |
-moz-border-radius:3px; | |
} | |
label:hover, label.selected{ | |
background:#ccc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment