Skip to content
Browse files

tweak

  • Loading branch information...
1 parent fd50b83 commit e05fb1c409c5a64f9af664a3fdf0168110face3f @tdreyno tdreyno committed Jun 16, 2009
Showing with 7 additions and 5 deletions.
  1. +2 −2 iphone-style-checkboxes.js
  2. +5 −3 style.css
View
4 iphone-style-checkboxes.js
@@ -14,12 +14,12 @@
elem.css({ opacity: 0 });
elem.wrap('<div class="container" />');
- elem.after('<div class="handle"><div style="background: ' + options.background + '"/><img src="images/slider.png" /></div>')
+ elem.after('<div class="handle"><div class="bg" style="background: ' + options.background + '"/><div class="slider" /></div>')
.after('<label class="off">'+ options.uncheckedLabel + '</label>')
.after('<label class="on">' + options.checkedLabel + '</label>');
var handle = elem.siblings('.handle'),
- handlebg = handle.children('div'),
+ handlebg = handle.children('.bg'),
offlabel = elem.siblings('.off'),
onlabel = elem.siblings('.on'),
container = elem.parent('.container'),
View
8 style.css
@@ -12,22 +12,24 @@
display: block;
height: 27px;
width: 39px;
- background: url(images/slider.png) no-repeat;
cursor: pointer;
position: absolute;
top: 0;
left: 0; }
- .handle div {
+ .handle .bg {
position: absolute;
width: 5px;
height: 100%;
top: 0;
left: 0;
z-index: 1; }
- .handle img {
+ .handle .slider {
position: absolute;
top: 0;
left: 0;
+ height: 27px;
+ width: 39px;
+ background: url(images/slider.png) no-repeat;
z-index: 2; }
label.on, label.off {
font-size: 17px;

0 comments on commit e05fb1c

Please sign in to comment.
Something went wrong with that request. Please try again.