dynamically write image's alt value as text with jQuery
-
29-10-2019 - |
Question
Trying to write a small function that updates a paragraph
with an image's alt text. the .active
class is the image being viewed. I'll launch this function on doc.ready
and under a few .click
events. Here's what i've got with no results:
$("#title").text($('.z.active').attr('alt', ''));
Thanks for your help!
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow