lib/assets/javascripts/up/popup.js.coffee in upjs-rails-0.4.3 vs lib/assets/javascripts/up/popup.js.coffee in upjs-rails-0.4.4
- old
+ new
@@ -113,10 +113,11 @@
###*
Opens a popup overlay.
@method up.popup.open
@param {Element|jQuery|String} elementOrSelector
+ @param {String} [options.url]
@param {String} [options.origin='bottom-right']
@param {String} [options.animation]
@param {Boolean} [options.sticky=false]
If set to `true`, the popup remains
open even if the page changes in the background.
@@ -124,10 +125,10 @@
###
open = (linkOrSelector, options) ->
$link = $(linkOrSelector)
options = u.options(options)
- url = u.option($link.attr('href'))
+ url = u.option(options.url, $link.attr('href'))
selector = u.option(options.target, $link.attr('up-popup'), 'body')
origin = u.option(options.origin, $link.attr('up-origin'), config.origin)
animation = u.option(options.animation, $link.attr('up-animation'), config.openAnimation)
sticky = u.option(options.sticky, $link.is('[up-sticky]'))
history = if up.browser.canPushState() then u.option(options.history, $link.attr('up-history'), false) else false