I\'m trying to get the source attribute of all images withing a specific div but somehow it keeps telling me that the function .attr() doesn\'t exist...
That\'s the
You have to make it a jquerby object to access attr('src').
var image = $(this); alert(image.attr('src'));
or you can use
var image = this; alert(image.src);
this is indeed an image element, and you need for it to be a jQuery element:
this
var image = $(this);