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!
This illustrates the basics of the jQuery in question. I assume you can handle the click events.
HTML:
Javascript:
Check it out on JSFiddle.