Scott Haneda wrote:
>I have a set of two forms on a page:
>billing info and shipping info, there is a checkbox that says "make my
>shipping info match my billing info.  If that box gets checked, I want to
>hide the second form.

This would be a good application of CSS3's :checked pseudo-class.
http://www.w3.org/TR/css3-selectors/#UIstates

Given XHTML:

<div id="shipping-info">
     <input id="address-is-same" type="checkbox" />
     <div>
         <!-- shipping inputs -->
     </div>
</div>

CSS:

#address-is-same:checked + div {display:none;}

And not a bad use of CSS either, because, if it fails, the content remains
accessible.

Steve
-- 
http://mrclay.org/ : http://frenchhorns.mrclay.org/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to