Not sure I agree on the title attribute not being suitable, but I see
your point on the alt.
Nevertheless, I want to change this:
<img src="/myimage.jpg" width="250" height="350" alt="Alt text"
title="Some text I want to use as the caption" class="captimg">
Into this:
<img src="/myimage.jpg" width="250" height="350" alt="Alt text"
title="Some text I want to use as the caption" class="captimg">
<p>Some text I want to use as the caption</p>
Nad have come up with a similar problem to before. This is what I
have, and I know the $(this) doesn't work here, but I don't see how
else to do it (and the 'after' method doesn't seem to take a function
as an argument).
$('.captimg').after('<p>' + $(this).attr('title') + '</p>');
What do you reckon?
Seb
On 13 Feb 2007, at 22:40, Klaus Hartl wrote:
> The alt attribute should be something different than the caption (and
> the title attribute as well by the way). Consider you were
> displaying a
> user image and the name of the user would be the caption in this case.
>
> <img src="..." alt="User:" />
> John Doe
>
> If images are disabled, it would look like:
>
> User: John Doe
>
> In your case it would look like:
>
> John Doe John Doe
>
> which is not at all reasonable.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/