         .morph()
           .with('fadein', 150)
           .and('expandv', 150)
-          .and =>
+          .and ->
             _.dropdown.animate().style('top', y + 'px', 150)
           .then =>
             if _.useScroll and _.dropdown?

    y: y,
    direction: direction
  }

class Dropdown extends hx.EventEmitter


    if @isOpen() then @hide(cb) else @show(cb)
    this

  dropdownContent: (dropdownContent, cb) ->
    if arguments.length
      setupDropdown = dropdownContentToSetupDropdown dropdownContent
      @_.dropdownContent = dropdownContent
      @_ = hx.shallowMerge @_, {
        setupDropdown,
        dropdownContent
      }
      @_.render cb
    else
      @_.dropdownContent

  show: (cb) ->

    if not @_.visible
      @_.visible = true
      @render cb
    this

  render: (cb) ->

    _ = @_
    if _.visible

      _.dropdown = hx.select(hx._.dropdown.attachToSelector).append('div').attr('class', 'hx-dropdown')

