¡@

Home 

2014/10/16 ¤W¤È 12:09:43

jquery Programming Glossary: ul.color

Amazon-like interface for selecting product size and color (i.e., click a little red box to select a red product, etc)

http://stackoverflow.com/questions/717988/amazon-like-interface-for-selecting-product-size-and-color-i-e-click-a-little

echoing the value to allow CSS to add appropriate styles ul.color li.red . The rest is pretty much your standard form markup... like appearance attributes are lined up horizontally ul.color li ul.size li border 1px solid #aaa margin 0 4px 0 0 padding.. to look at it if JS remove inputs from sight .js active ul.color input .js active ul.size input position absolute left 999em..

Amazon-like interface for selecting product size and color (i.e., click a little red box to select a red product, etc)

http://stackoverflow.com/questions/717988/amazon-like-interface-for-selecting-product-size-and-color-i-e-click-a-little

corresponding to the input's name and a class on each LI echoing the value to allow CSS to add appropriate styles ul.color li.red . The rest is pretty much your standard form markup. The JavaScript The JavaScript is very simple. All we do is detect.. thing done. Firstly float the buttons and give them a more button like appearance attributes are lined up horizontally ul.color li ul.size li border 1px solid #aaa margin 0 4px 0 0 padding 2px float left overflow hidden position relative We put position.. view. This will keep it accessible but we just no longer have to look at it if JS remove inputs from sight .js active ul.color input .js active ul.size input position absolute left 999em Next up is turning the labels into buttons if JS turn color..