I am trying to add a character d with the value of this.id given by below code as like : dclicki25 . How I can get this?
$('.divclasss').click(function(){
console.log(this.id); //clicki25 , clicki26 based on the clicking element
});
I am trying to add a character d with the value of this.id given by below code as like : dclicki25 . How I can get this?
$('.divclasss').click(function(){
console.log(this.id); //clicki25 , clicki26 based on the clicking element
});
just Concatenatewith d like this
$('.divclasss').click(function(){
console.log('d'+ this.id); //clicki25 , clicki26 based on the clicking element
});
You can concatenate this.id with the string 'd' very easily with the below small change:
$('.divclasss').click(function(){
console.log('d'+ this.id); //clicki25 , clicki26 based on the clicking element
});