     if $link.is('.up-current')
       close()
     else
-      open($link)
+      attach($link)
   )
 
   # Close the popup when someone clicks outside the popup

  # The framework is reset between tests
  up.on 'up:framework:reset', reset

  open: open
  close: close
  source: source
  defaults: config.update
  contains: contains
  
)(jQuery)

    $element.closest('.up-popup').length > 0

  ###*
  Opens this link's destination of in a popup overlay:

      <a href="/decks" up-popup=".deck_list">Switch deck</a>

  If the `up-sticky` attribute is set, the dialog does not auto-close
  if a page fragment below the popup overlay updates:
