Skip to content

Instantly share code, notes, and snippets.

@JimboFromLimbo
Created June 24, 2016 00:11
Show Gist options
  • Save JimboFromLimbo/6077391fb181a914649c927058a5d1ce to your computer and use it in GitHub Desktop.
Save JimboFromLimbo/6077391fb181a914649c927058a5d1ce to your computer and use it in GitHub Desktop.
function createSignaturePads() {
//-----Selects all elements that start with the id signaturePad-//
var elems=document.querySelectorAll("*[id^='signaturePad-']");
//-----Start of the forEach Loop//
[].forEach.call(elems,function(elem){
console.log(elem)
var oldId=elem.getAttribute("id");
console.log(oldId)
// can not resizeCanvas with out getElementById of 'oldId'
var canvas = document.getElementById(oldId);
// signaturePad Creation
var oldId=new SignaturePad
(document.getElementById(oldId))
resizeCanvas(canvas);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment