$('.map').click( function(event){
event.preventDefault();
switch(event.target.id){
case "_001": //some code
break;
case "_002": //some code
break;
case "_003": //some code
break;
}
});
function takepicture() {
var context = canvas.getContext('2d');
if (width && height) {
canvas.width = width;
canvas.height = height;
context.drawImage(video, 0, 0, width, height);
var data = canvas.toDataURL('image/png');
photo.setAttribute('src', data);
} else {
clearphoto();
}
}
Array.From(modals).forEach
[...modals].forEach