I'm working on SimpleWebRTC. When new party join a room, new video element is added. Now I need to handle click on any of the video element. So I write the code bellow
$('video').click(function(e) {
console.log('clicked');
e.preventDefault()
});
Obviously the block was within jQuery document ready. But I'm not seeing anything on console. The weird thing is when I'm pasting the code above in console of browser, that's working as expected.
I need your guideline to solve the issue.
Thanks.