[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: 14 May 2009 .. and I'd like JQuery script to output it as this: May 14, 2009 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 browser language (and UK format to all other users). Please let me know