Skip to content

Instantly share code, notes, and snippets.

@lexs
Created September 19, 2011 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lexs/1227747 to your computer and use it in GitHub Desktop.
Save lexs/1227747 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
// Remove links to articles that are not yet created
$('a.new').replaceWith(function() {
return $(this).contents();
});
// Wrap tables so we can scroll them
$('table.wikitable').wrap('<div class="tablewrapper" />');
// Sort tables
sortables_init();
});
function scrollTo(id) {
// For some reason jQuery can't find some id's
var elem = document.getElementById(id);
$('html,body').animate({scrollTop: $(elem).offset().top}, 300);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment