SyntaxFix
Write A Post
Hire A Developer
Questions
The better way of doing this without jQuery:
const images = document.getElementsByTagName('img'); for (let i = 0; i < images.length; i++) { images[i].addEventListener('contextmenu', event => event.preventDefault()); }