tomcat
1
I have a few images on screen and trying to catch a click event. I have read the various threads and have tried this code:
I get a blank reply for console.log(event.target.id) and don’t get the id of the element which has been clicked. What am I doing wrong?
pps
2
try following:
$$('a').on('click',function(){ var thisId = $$(this).attr('id'); console.log(thisId); });
2 Likes
tomcat
3
Great, that worked.
.
Any suggestions as how to detect a double click?
Dom7('myElement').on('dblclick', () => { console.log('dbclk') })
2 Likes