CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   Custom Checkboxes not working (http://www.codingforums.com/showthread.php?t=285237)

MrTIMarshall 01-03-2013 10:10 PM

Custom Checkboxes not working
 
Hello,

Where I found them: http://ryanfait.com/resources/custom...radio-buttons/
My attempt: https://tornhq.com/Events/HallowTown/checkbox.html

I don't know what I have done differently, however I do not have the same result...

Best Regards,
Tim

AndrewGSW 01-03-2013 11:41 PM

You haven't installed the image checkbox.png.

MrTIMarshall 01-03-2013 11:46 PM

Thank you, so obvious I feel stupid!

Old Pedant 01-03-2013 11:54 PM

What are the spans in there for???

Code:

<body>
<p>
<span class="checkbox" style="background-position: 0px -50px;"></span>
<input type="checkbox" name="1" id="1" checked="checked" class="styled">
<label for="1">Check 1</label>
</p>
<p>
<span class="checkbox" style="background-position: 0px -50px;"></span>
<input type="checkbox" name="2" id="2" checked="checked" class="styled">
<label for="2">Check 2</label>
</p>
</body>

Those <span>s do *NOT* belong there.

PLEASE don't use names or ids that start with numbers (digits)!!

AndrewGSW 01-03-2013 11:57 PM

I believe the spans are created by the feature.. with their backgrounds set to certain images.

Old Pedant 01-04-2013 12:11 AM

Well, in Chrome, he ends up with 4 checkboxes, not two. Where two of them are the <span>s and don't function as checkboxes.

So maybe there's a bug in that library.


All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.