Difference between revisions of "MediaWiki:Common.js"

From GreenVulcano Wiki
Jump to: navigation, search
(Created page with "Any JavaScript here will be loaded for all users on every page load.: $(function() { $("div[class^=version_]").each(function() { var scope = $(this).attr("class").su...")
(No difference)

Revision as of 15:58, 8 January 2013

/* Any JavaScript here will be loaded for all users on every page load. */
$(function() {
   $("div[class^=version_]").each(function() {
     var scope = $(this).attr("class").substr(8,2);
     var version = $(this).attr("class").substr(10);
  
     $(this).append("<div class='version_container'><div class='scope'>&" + scope + ";</div><div class='ver'>" + version + "</div></div>");
     $(this).children("div.version_container").css('top', -$(this).height());
   });
});