[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] Replace content with title attribute value

2009-06-12 Thread jay7
Hi, I have this: span class=date title=May 14, 200914 May 2009/span .. and I'd like JQuery script to output it as this: span class=date title=May 14, 2009/span Basically, I'm checking the browser language and I want to display all dates in US date format to all users with EN-CA and EN-US