Grow your CSS skills. Land your dream job.

Is there a better way to write this?

  • # August 11, 2012 at 5:16 pm

    $('#close-content').click(function(){
    $('.content-container').hide();
    $('#projects-panel').hide();
    $('#sitelocations-panel').hide();
    $('#team-panel').hide();
    $(this).hide();
    });

    Seems like it should one line or something. :)

    # August 11, 2012 at 6:11 pm
    $('#close-content').click(function(){
    $('.content-container, #projects-panel, #sitelocations-panel, #team-panel, #close-content').hide();
    });
    # August 11, 2012 at 7:57 pm

    Ah, I knew it! Thanks wolf!

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".