How to get the top of an image minus 100 pixels?

Viewed 28

I'm trying to get the to target the top of an image minus 100px. I'm using the below which isn't working but I think it shows what I'm trying to do... Any help is appreciated

const target = document.querySelector('#myTarget').offset().top - 100;
1 Answers
Related