Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Is there a better way to write this?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #39337
    StephBertha
    Participant

    $('#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. :)

    #107744
    wolfcry911
    Participant
    $('#close-content').click(function(){
    $('.content-container, #projects-panel, #sitelocations-panel, #team-panel, #close-content').hide();
    });
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.