dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.38k stars 3.49k forks source link

Adding "title" attrib to the popup image #1159

Open geeday opened 3 years ago

geeday commented 3 years ago

within src/js/image.js we have img.alt = item.el.find('img').attr('alt');

which passes the "alt" attrib of the base image to the main popup. can we add: img.title = item.el.find('img').attr('title'); below that line of code which will add the "title" attrib.

I'd do it myself, but not got the build stuff installed

I guess "git clone" git add git commit git push (etc) on untested code is bad

thanks

ixaxi commented 3 years ago

yes you can :) It will then show the title when the mouse hovers over the image.