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...")
 
 
Line 5: Line 5:
 
     var version = $(this).attr("class").substr(10);
 
     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).prepend("<div class='version_container'><div class='scope'>&" + scope + ";</div><div class='ver'>" + version + "</div></div>");
    $(this).children("div.version_container").css('top', -$(this).height());
 
 
   });
 
   });
 
});
 
});

Latest revision as of 16:31, 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).prepend("<div class='version_container'><div class='scope'>&" + scope + ";</div><div class='ver'>" + version + "</div></div>");
   });
});