Jump To:

  1. ui/proxy-click.initializer
  2. ui/proxy-click.defaults
  3. ui/proxy-click.setDefaults(options)
  4. ui/proxy-click.init()
  5. ui/proxy-click.setupProxy(proxy, userOptions)
  6. ui/proxy-click.attachHandlers(proxy, child, config)

ui/proxy-click

Used for cards and things that look like they should be clickable even though the link in their content is the only clickable element. This way the entire cards content doesn't need to be in a link (which isn't accessible).

The script allows only for clicks with a duration of 250ms to avoid conflict with a user selecting text. Works with either links or buttons because it just uses the elements .click(). Uses data-attributes for selection by default.

ui/proxy-click.initializer

Proxy Click Component Initializer

Kind: static constant of ui/proxy-click

ui/proxy-click.defaults

Default options

Kind: static constant of ui/proxy-click

ui/proxy-click.setDefaults(options)

Kind: static method of ui/proxy-click

Param Type Description
options Object Change options used as default for dialogs, can then be overridden by data attribute settings on element

ui/proxy-click.init()

Initialize everything in document

  • This will only initialize elements once, it is safe to call on page changes

Kind: static method of ui/proxy-click

ui/proxy-click.setupProxy(proxy, userOptions)

Setup a single proxy click

Kind: static method of ui/proxy-click

Param Type Description
proxy Node The container who's click should proxy the click of inner element with options.selector (defaults to [data-ulu-proxy-click-source])
userOptions Object Options to override defaults

ui/proxy-click.attachHandlers(proxy, child, config)

Main function for attaching behaviors that enable proxy click

Kind: static method of ui/proxy-click

Param Type Description
proxy Node The container who's click should proxy the click of inner element with options.selector (defaults to [data-ulu-proxy-click-source])
child Node The element who is being proxied and will get clicked if the proxy is clicked (as long as not an interactive element within proxy)
config Object Merged/final options object