I am trying to add an else statement to this piece of javascript so that if a div-1 is clicked once it shows div-2 and if div-1 is clicked again it hides div-2.

Does anyone know how I could do this?

<!-- language: lang-js -->
$(function() {
    $('.div-1').click(function() {
        $('.div-2').show();
        return false;
    });        
});

I totally agree with Jason P's answer that you should be using toggle instead, but in case you actually needed to use an if statement, you can do this:

<!-- language: lang-js -->
$('.div-1').click(function() {
    if ($('.div-2').is(':visible')) {
        $('.div-2').hide();
    } else {
        $('.div-2').show();
    }
   return false;
});

jsFiddle