newtheatre/history-project

View on GitHub
_coffee/app/header.coffee

Summary

Maintainability
Test Coverage
document.addEventListener 'turbolinks:load', ->
  # Mobile search box
  $('#site-search-show').click ->
    $('#site-search').addClass('elem-show')
    $('#site-search-bg').removeClass('elem-hidden')
    $('#q').focus()
  $('#site-search-bg').click ->
    $('#site-search').removeClass('elem-show')
    $('#site-search-bg').addClass('elem-hidden')