View Full Version : checkbox & css

10-29-2007, 07:34 PM
Is there a way to have the checkbox checked when rolled over, or is that a JS thing?

10-29-2007, 07:45 PM
<input type="checkbox" onmouseover="this.checked=(this.checked)? false : true;">

10-29-2007, 08:26 PM
Worth mentioning that if you plan on doing this on a group of checkboxes it'd be best to strip out the inline JS and do it in an included file through event handlers.

function() { this.checked=(this.checked)? false : true }

The above is a Prototype-like syntax but the logic would be the same if you were doing it without a Library.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum