Skip to content

Instantly share code, notes, and snippets.

@quickredfox
Created June 9, 2010 21:46
Show Gist options
  • Save quickredfox/432226 to your computer and use it in GitHub Desktop.
Save quickredfox/432226 to your computer and use it in GitHub Desktop.
/* Bien sur, cet exemple utilise jQuery... */
$(function() {
$('article').each(function() {
var $a = $(this),
$link = $('<a>').attr(
{
href: $a.attr('cite'),
text: $a.attr('title')
}, true
);
$a.attr('data-scriptEnhanced',true)
.prepend($('<header>').html($link));
.append($('<footer>').html('<time>publié: '+$a.attr('pubdate')+'</time>'));
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment