This version is old school.
Please find jQuery plugins on npm.
jQuery Pixel Select
jQuery plugin to allow selection of non-transparent areas of images only or just to check for transparent / non-transparent areas. Also allows to select elements behind transparent areas of overlapping images.