[jQuery] Re: Replace content with title attribute value

2009-06-13 Thread jay7
Brilliant, thanks a lot. Here is the final script that does exactly what I wanted: $(.date).each( function (i) { var formattedDate = $(this).attr('title'); $(this).html(formattedDate); }); $('.date').removeAttr(title);

[jQuery] Re: Replace content with title attribute value

2009-06-12 Thread amuhlou
I would probably do something like this: var formattedDate = $('span.date').attr('title'); $('span.date').html(formattedDate); if you have multiple date spans on the page, you may need to use the .each() method On Jun 12, 12:33 pm, jay7 jayd...@gmail.com wrote: Hi, I have this: span