Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Thanked 0 Times in 0 Posts

    checkbox hack help

    Hi guys

    I'm coding something like a photo gallery, basically when you click on a thumbnail, a larger image will appear.

    I used the checkbox hack to mimic an on click event, so when you click on the thumbnail1, you check the checkbox1 and the picture1 appears.

    The problem is if I click on the thumbnail2, when I click at thumbnail1 the picture1 wont appear because picture2 its already there!

    What I wanted to know is if it is possible, for example, when I check the checkbox1, automatically uncheck all the other checkboxes.

    Thanks for your time (:

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Halle (Saale), Germany
    Thanked 1,006 Times in 979 Posts
    This “checkbox hack” should not be used in a production environment, it’s called “hack” for a reason, and that is that it’s buggy and introduces bad semantics into HTML, and is generally bad practice. That one can do some edge cases with HTML and CSS doesn’t mean that one should do it. Rather, you should use a real photo gallery script, possibly enhanced with JavaScript.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts