A string can contain attributes in the form like this:
let attr = ' min="0" step="5" max="100" ';
or
let attr = ' min="2019-12-25T19:30" ';
etc.
Is there a function (either JS or jQuery) to assign these attributes to a HTML element?
Similar to setAttribute(name, value); but for multiple attributes.
let ele = document.getElementsByClassName("user-info")[0];ele.min = "min";console.log(ele.min);But your custom attrributes will not be visible in the tags, i guess.setAttributewith each one individually.