Template talk:Grid/Crafting Table
Revision as of 14:56, 1 December 2011 by MidnightLightning (talk | contribs) (Created page with "== Animate? == Any thoughts on updating this (and the other GUI templates) to be able to animate as the [http://www.minecraftwiki.net/wiki/Template:Crafting_grid Minepedia wiki o...")
Animate?[edit]
Any thoughts on updating this (and the other GUI templates) to be able to animate as the Minepedia wiki one does? It would involve a little JavaScript and some template changes, but I don't think it would break all the pages that use the template.
Javascript[edit]
From http://www.minecraftwiki.net/wiki/MediaWiki:Common.js
/** Grid/slide **/ // this needs to be unminified; MediaWiki automatically minifies all CSS and JS before // serving it to users, so minifying it here just makes it nigh-unmaintainable jQuery(function(){jQuery(".GridSlide").each(function(){jQuery("div.GridSlideChild:first",this).addClass("active").show()});setInterval(function(){jQuery(".GridSlide").each(function(){var b=jQuery("div.active",this),a=b.next();a.length<1&&(a=jQuery("div.GridSlideChild:first",this));b.removeClass("active").hide();a.addClass("active").show()})},2E3)}); jQuery(function(){jQuery("div.grid-input-slide").each(function(){jQuery("span.grid-input:first",this).addClass("active").show();jQuery("span.grid-input-numbers:first",this).addClass("active").show()});jQuery("div.grid-output-slide").each(function(){jQuery("span.grid-output:first",this).addClass("active").show();jQuery("span.grid-output-numbers:first",this).addClass("active").show()});setInterval(function(){jQuery("div.grid-input-slide").each(function(){var b=jQuery("span.grid-input.active",this), a=b.next();if(a.length<1||!a.hasClass("grid-input"))a=jQuery("span.grid-input:first",this);b.removeClass("active").hide();a.addClass("active").show();b=jQuery("span.grid-input-numbers.active",this);a=b.next();a.length<1&&(a=jQuery("span.grid-input-numbers:first",this));b.removeClass("active").hide();a.addClass("active").show()});jQuery("div.grid-output-slide").each(function(){var b=jQuery("span.grid-output.active",this),a=b.next();if(a.length<1||!a.hasClass("grid-output"))a=jQuery("span.grid-output:first", this);b.removeClass("active").hide();a.addClass("active").show();b=jQuery("span.grid-output-numbers.active",this);a=b.next();a.length<1&&(a=jQuery("span.grid-output-numbers:first",this));b.removeClass("active").hide();a.addClass("active").show()})},2E3)});
Slide template[edit]
http://www.minecraftwiki.net/wiki/Template:Grid/Crafting_Square_Slide
--MidnightLightning☇(talk) 15:56, 1 December 2011 (CET)