Skip to content

Instantly share code, notes, and snippets.

@nikosd
Created November 2, 2008 14:20
Show Gist options
  • Save nikosd/21699 to your computer and use it in GitHub Desktop.
Save nikosd/21699 to your computer and use it in GitHub Desktop.
// Using jQuery Events and Selectors
$(document).ready(function(){
var original_content = $('div#container h1 a').html();
var with_fake_first_letter = '<span class="first-letter">'
+ original_content.slice(0,1)
+ '</span>'
+ original_content.slice(1,original_content.length - 1);
$('div#container h1 a').html(with_fake_first_letter);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment