Given the following code:
var counter = 0; //counter variable
$('#divfuerimage').on('click', function(evt){
counter= counter+1; //count up
alert(counter);
var containerX = evt.pageX - $(this).offset().left,
containerY = evt.pageY - $(this).offset().top;
$('<div class="child" id=/*here the value of counter should be*/></div>')
How can I use the Value of my Counter Variable as an ID?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…