Multiple canvas

0

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

    
asked by Eduard Zora 14.03.2017 в 19:37
source

1 answer

1
$(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>");
     }
  }
});
    
answered by 14.03.2017 / 20:33
source