Skip to content
Snippets Groups Projects
Verified Commit 32e1c546 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Remove length attributes form DOM after initialising Cleave

parent c6251ca2
No related branches found
No related tags found
No related merge requests found
......@@ -4,4 +4,6 @@ document.querySelectorAll("[data-dj-cleavejs]").forEach(function(element) {
let cleave_options = JSON.parse(element.getAttribute("data-dj-cleavejs"));
// Pass options verbatim to Cleave constructor
new Cleave(element, cleave_options);
// Remove lengthy attribute from DOM
element.removeAttribute("data-dj-cleavejs");
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment