I need to perform a functionality that by means of a select can create the same amount of canvas, that is, if in a select I choose quantity "3", I create 3 canvas
I need to perform a functionality that by means of a select can create the same amount of canvas, that is, if in a select I choose quantity "3", I create 3 canvas
$(function () {
// bind change event to select
$('#marcas').on('change', function () {
var url = $(this).val(); // get selected value
for(var i = 0;i < url;i++){
$("#myDiv").append("<canvas height="100" width = "100" id = 'canvas-"+i+"' ></canvas>");
}
}
});