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 class="date" title="May 14, 2009">14 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 browser > language (and UK format to all other users). Please let me know if > there is a better way of doing it, I couldn't find anything. Thanks.