Tabbed navigation to hide and show pages
It's hard to give an exact answer without knowing your HTML structure, but if we assume that:


Your tab headers (apparently li-elements with classes like .search_locations and ids like #search_distributors) have some common class, such as .tabheader.
Each of your tabs is wrapped in an element with a common class, such as .tab.
You can add a HTML5 data- attribute on your tab headers to designate the tab whiches header it is.


Assumptions 1. and 2. are necessary so that you can use a common function for all the tabs without writing what is essentially the same code thrice.

Number 3. could be implemented like this:

&lt;li class="tabheader search_locations" id="search_distributors" data-tab-id="search_distributors_tab"&gt;Search locations&lt;/li&gt;


Then you can reduce your CoffeeScript to

$('.tabheader').on 'click', (e) =&gt;
    e.preventDefault()
    tabId = $(e.currentTarget).data('tabId')
    $('.tab').hide()
    $('#' + tabId).show()
    $('.tabheader').removeClass('active')
    $(e.currentTarget).addClass('active')


See my jsFiddle.

If you, some strange reason, would not be able to alter your HTML in any way, your code would still be easier to maintain if you wrote a common function for displaying a tab, then called it for each of the click events:

showTab = (e, tab, header) -&gt;
    e.preventDefault()
    allTabs = [
        '#distributor_location_search_filter_form', 
        '#distributor_location_search_container', 
        '#international_distributors_location_container', 
        '#all_distributors_location_container'
    ]
    $(allTabs.join(',')).hide()
    if tab instanceof Array
        tab = tab.join(',')
    $(tab).show()
    allHeaders = [
        'li.search_locations',
        'li.international',
        'li.all_distributors'
    ]
    $(allHeaders.join(',')).removeClass('active')
    $(header).addClass('active')

$('#search_distributors').on 'click', (e) =&gt;
    showTab(e, ['#distributor_location_search_filter_form', '#distributor_location_search_container'], 'li.search_locations')

$('#international_distributors').on 'click', (e) =&gt;
    showTab(e, '#international_distributors_location_container', 'li.international')

$('#all_distributors').on 'click', (e) =&gt;
    showTab(e, '#all_distributors_location_container', 'li.all_distributors')


See my other jsFiddle.

Note that there are also multiple jQuery plugins for tab behavior, such as one in Bootstrap and jQuery UI.