 class IconButton
   constructor: (options) ->
-    $targetElement = $(options.targetElement)
-
     @$el = $ """
       <factlink-icon-button>
         <factlink-icon-button-bubble>

    """
    FactlinkJailRoot.$factlinkCoreContainer.append(@$el)

    @_tether = new Tether
      element: @$el[0]
      target: $targetElement[0]
      attachment: 'top left'
      targetAttachment: 'top right'
      classPrefix: 'factlink-tether'
      targetOffset: options.targetOffset || '0 0'

    @_robustHover = new FactlinkJailRoot.RobustHover
      $el: @$el

      mouseleave: options.onmouseleave
    @$el.on 'click', options.onclick

    @_tether = new Tether
      element: @$el[0]
      target: options.targetElement
      attachment: 'top left'
      targetAttachment: 'top right'
      classPrefix: 'factlink-tether'
      targetOffset: options.targetOffset || '0 0'

  destroy: ->
    @_tether.destroy()
