dashboard.js.coffee 781 B

1234567891011121314151617181920212223242526272829
  1. # Place all the behaviors and hooks related to the matching controller here.
  2. # All this logic will automatically be available in application.js.
  3. # You can use CoffeeScript in this file: http://coffeescript.org/
  4. $(document).ready ->
  5. $(document).foundation('joyride', {cookie_monster: true, cookie_expires: 999})
  6. $(document).foundation('joyride', 'start')
  7. $('#email_signup_form').hide()
  8. $('#email_signup_button').click ->
  9. $('#email_signup_form').slideDown()
  10. DropDown = (el) ->
  11. @dd = el
  12. @initEvents()
  13. DropDown:: = initEvents: ->
  14. obj = this
  15. obj.dd.on "click", (event) ->
  16. $(this).toggleClass "active"
  17. event.stopPropagation()
  18. $ ->
  19. dd = new DropDown($("#dd"))
  20. $(document).click ->
  21. # all dropdowns
  22. $(".wrapper-dropdown").removeClass "active"