there are two ways for for handling events on click
in JS
<span onclick="handle()"></span>
function handle(){......}
in jquery
<span class="handle"></span>
jQuery('.handle').click(function(){
.....
....
});
so i want to ask attaching click event as done above in jQuery is bad practice
is it called hijacking
No .click itself can not be 'hacked' or 'hijacked' to harm your website.
Any probability of hijacking would be from the function you have written itself but it will be hard as long as all the function is client side. Jquery is very safe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With