Change opacity of image continuously with slider position

I use markerPos in my interactive slider demo. You could take a look there.