SyntaxFix
Write A Post
Hire A Developer
Questions
I use a function like the following:
function (baseId) { return baseId + '-' + Math.random().toString(16).slice(2); }
In parameter baseId I indicate a prefix for the id to be easier to identify the elements.
baseId