Give help. Get help.

  • # January 15, 2013 at 6:16 pm

    hi guys, I got a checkbox and when the chebox is checked I want to show a div and when is unchecked I want to hide a div, but the code that I write isn’t working:

    $(‘.chk’).on(‘click’, function () {
    if ($(this).is(‘:checked’))



    # January 15, 2013 at 7:00 pm

    Here’s some code that will do the job but you should change the selectors I’ve used

    # January 15, 2013 at 7:12 pm

    Sorry, @karlpcrowley, two in a row makes it look like I’m a dick! Minor tweak since `live()` is deprecated:

    # January 16, 2013 at 1:56 am

    karlpcrowley and TheDoc thaks, more simple then my code

    # January 16, 2013 at 3:25 am

    @thedoc You’re definitely not a dick, it’s the reason we’re here :)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.