Skip to content

Instantly share code, notes, and snippets.

@xdissent
Created January 19, 2011 21:10
Show Gist options
  • Save xdissent/786872 to your computer and use it in GitHub Desktop.
Save xdissent/786872 to your computer and use it in GitHub Desktop.
Wrap question marks in headers with span in jQuery 1.4+
$('h1, h2').html(function(i, h) {
return h.replace(/\?/g, '<span class="question-mark">?</span>');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment