Skip to content

Instantly share code, notes, and snippets.

@benjy8001
benjy8001 / formAttribute.js
Last active April 17, 2019 14:43 — forked from tjvantoll/formAttribute.js
Polyfill for Form Attribute on Submit Buttons
/**
* The form attribute can be used to associate a submit button with a form, even
* if the button is not a child of the <form> itself.
*
* This polyfill detects support and polyfills the functionality using jQuery.
*/
(function() {
function formAttributeSupport() {
// detect if browser supports this