User:Jens Ingels/common.js/egg.js

/*Testing $('.tabBox').append('.tabTitle{display:inline-block;background:rgba(192,192,192,.1) !important;background:silver;padding:5px 5px 0;margin:-5px 5px 0;border-radius:100% 100% 0 0/10px 10px 0 0;-webkit-border-radius: 100% 100% 0 0/10px 10px 0 0;cursor:pointer;transition:background .5s;-moz-transition:background .5s;-webkit-transition:background .5s;-o-transition:background .5s}.tabTitle.active{background:rgba(192,192,192,.3) !important;font-weight:bold}.tabTitle:hover{background:rgba(192,192,192,.5) !important} '); $('.tabTitle').click(function{$('.tabTitle').removeClass('active');$(this).addClass('active');}); $('#tab-1').click(function{$('.tabContent').hide;$('#tab-1-content').show;}); $('#tab-2').click(function{$('.tabContent').hide;$('#tab-2-content').show;}); $('#tab-3').click(function{$('.tabContent').hide;$('#tab-3-content').show;}); $('#tab-4').click(function{$('.tabContent').hide;$('#tab-4-content').show;}); $('#tab-5').click(function{$('.tabContent').hide;$('#tab-5-content').show;}); $('#tab-6').click(function{$('.tabContent').hide;$('#tab-6-content').show;}); $('#tab-7').click(function{$('.tabContent').hide;$('#tab-7-content').show;}); $('#tab-8').click(function{$('.tabContent').hide;$('#tab-8-content').show;}); $('#tab-9').click(function{$('.tabContent').hide;$('#tab-9-content').show;}); $('#tab-10').click(function{$('.tabContent').hide;$('#tab-10-content').show;});



//Sandbox Eggs (function($) { jQuery.fn.eggTab = function {  return this.each(function { var $this = $(this);

$this.click(function(event) {        event.preventDefault; /* hide terra */ $( "table.wikitable.dc-dot td#h-exclusive_terra" ).parents.addClass( "hide-terra" ); $( "table.wikitable.dc-dot td#h-exclusive_terra" ).parents.next.addClass( "hide-terra" ); $( "table.wikitable.dc-dot td#h-exclusive_terra" ).parents.next.next.addClass( "hide-terra" ); $( "table.wikitable.dc-dot td#h-exclusive_terra" ).parents.next.next.next.addClass( "hide-terra" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-terra" );

/* hide flame */ $( "table.wikitable.dc-dot td#h-exclusive_flame" ).parents.addClass( "hide-flame" ); $( "table.wikitable.dc-dot td#h-exclusive_flame" ).parents.next.addClass( "hide-flame" ); $( "table.wikitable.dc-dot td#h-exclusive_flame" ).parents.next.next.addClass( "hide-flame" ); $( "table.wikitable.dc-dot td#h-exclusive_flame" ).parents.next.next.next.addClass( "hide-flame" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-flame" );

/* hide sea*/ $( "table.wikitable.dc-dot td#h-exclusive_sea" ).parents.addClass( "hide-sea" ); $( "table.wikitable.dc-dot td#h-exclusive_sea" ).parents.next.addClass( "hide-sea" ); $( "table.wikitable.dc-dot td#h-exclusive_sea" ).parents.next.next.addClass( "hide-sea" ); $( "table.wikitable.dc-dot td#h-exclusive_sea" ).parents.next.next.next.addClass( "hide-sea" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-sea" );

/* hide nature*/ $( "table.wikitable.dc-dot td#h-exclusive_nature" ).parents.addClass( "hide-nature" ); $( "table.wikitable.dc-dot td#h-exclusive_nature" ).parents.next.addClass( "hide-nature" ); $( "table.wikitable.dc-dot td#h-exclusive_nature" ).parents.next.next.addClass( "hide-nature" ); $( "table.wikitable.dc-dot td#h-exclusive_nature" ).parents.next.next.next.addClass( "hide-nature" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-nature" );

/* hide electric*/ $( "table.wikitable.dc-dot td#h-exclusive_electric" ).parents.addClass( "hide-electric" ); $( "table.wikitable.dc-dot td#h-exclusive_electric" ).parents.next.addClass( "hide-electric" ); $( "table.wikitable.dc-dot td#h-exclusive_electric" ).parents.next.next.addClass( "hide-electric" ); $( "table.wikitable.dc-dot td#h-exclusive_electric" ).parents.next.next.next.addClass( "hide-electric" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-electric" );

/* hide ice*/ $( "table.wikitable.dc-dot td#h-exclusive_ice" ).parents.addClass( "hide-ice" ); $( "table.wikitable.dc-dot td#h-exclusive_ice" ).parents.next.addClass( "hide-ice" ); $( "table.wikitable.dc-dot td#h-exclusive_ice" ).parents.next.next.addClass( "hide-ice" ); $( "table.wikitable.dc-dot td#h-exclusive_ice" ).parents.next.next.next.addClass( "hide-ice" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-ice" );

/* hide metal*/ $( "table.wikitable.dc-dot td#h-exclusive_metal" ).parents.addClass( "hide-metal" ); $( "table.wikitable.dc-dot td#h-exclusive_metal" ).parents.next.addClass( "hide-metal" ); $( "table.wikitable.dc-dot td#h-exclusive_metal" ).parents.next.next.addClass( "hide-metal" ); $( "table.wikitable.dc-dot td#h-exclusive_metal" ).parents.next.next.next.addClass( "hide-metal" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-metal" );

/* hide dark*/ $( "table.wikitable.dc-dot td#h-exclusive_dark" ).parents.addClass( "hide-dark" ); $( "table.wikitable.dc-dot td#h-exclusive_dark" ).parents.next.addClass( "hide-dark" ); $( "table.wikitable.dc-dot td#h-exclusive_dark" ).parents.next.next.addClass( "hide-dark" ); $( "table.wikitable.dc-dot td#h-exclusive_dark" ).parents.next.next.next.addClass( "hide-dark" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-dark" );

/* hide light*/ $( "table.wikitable.dc-dot td#h-exclusive_light" ).parents.addClass( "hide-light" ); $( "table.wikitable.dc-dot td#h-exclusive_light" ).parents.next.addClass( "hide-light" ); $( "table.wikitable.dc-dot td#h-exclusive_light" ).parents.next.next.addClass( "hide-light" ); $( "table.wikitable.dc-dot td#h-exclusive_light" ).parents.next.next.next.addClass( "hide-light" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-light" );

/* hide war */ $( "table.wikitable.dc-dot td#h-exclusive_war" ).parents.addClass( "hide-war" ); $( "table.wikitable.dc-dot td#h-exclusive_war" ).parents.next.addClass( "hide-war" ); $( "table.wikitable.dc-dot td#h-exclusive_war" ).parents.next.next.addClass( "hide-war" ); $( "table.wikitable.dc-dot td#h-exclusive_war" ).parents.next.next.next.addClass( "hide-war" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-war" );

/* hide pure */ $( "table.wikitable.dc-dot td#h-exclusive_pure" ).parents.addClass( "hide-pure" ); $( "table.wikitable.dc-dot td#h-exclusive_pure" ).parents.next.addClass( "hide-pure" ); $( "table.wikitable.dc-dot td#h-exclusive_pure" ).parents.next.next.addClass( "hide-pure" ); $( "table.wikitable.dc-dot td#h-exclusive_pure" ).parents.next.next.next.addClass( "hide-pure" ); $( "table.wikitable.dc-dot tbody" ).removeClass( "hide-pure" ); });  }); }; })(jQuery);

$(document).ready(function {

$('img#extab-terra').ready(function {     $('img#extab-terra').eggTab;      $(document).removeClass( "hide-terra" );   });

});

/* $( "img#extab-terra" ).click(function { $( document ).eggsTabs; $( "table.wikitable.dc-dot" ).removeClass( "hide-terra" ); });

$( "div#exclusive_hybrid_navigation" ).replaceWith( '  -   -   - <img id="extab-nature" alt="Element Nature" src="http://static2.wikia.nocookie.net/__cb20130301145814/dragoncity/images/thumb/1/1d/Element_Nature.png/15px-Element_Nature.png" data-image-name="Element Nature.png" data-image-key="Element_Nature.png" data-src="http://static2.wikia.nocookie.net/__cb20130301145814/dragoncity/images/thumb/1/1d/Element_Nature.png/15px-Element_Nature.png" class="lzyPlcHld lzyTrns lzyLoaded" onload="if(typeof ImgLzy==&quot;object&quot;){ImgLzy.load(this)}" height="30" width="15">  - <img id="extab-electric" alt="Element Electric" src="http://static1.wikia.nocookie.net/__cb20130301145733/dragoncity/images/thumb/8/8a/Element_Electric.png/15px-Element_Electric.png" data-image-name="Element Electric.png" data-image-key="Element_Electric.png" data-src="http://static1.wikia.nocookie.net/__cb20130301145733/dragoncity/images/thumb/8/8a/Element_Electric.png/15px-Element_Electric.png" class="lzyPlcHld lzyTrns lzyLoaded" onload="if(typeof ImgLzy==&quot;object&quot;){ImgLzy.load(this)}" height="30" width="15">  -   -   -   - <img id="extab-light" alt="Element Light" src="http://static1.wikia.nocookie.net/__cb20130601000120/dragoncity/images/thumb/4/44/Element_Light.png/15px-Element_Light.png" data-image-name="Element Light.png" data-image-key="Element_Light.png" data-src="http://static1.wikia.nocookie.net/__cb20130601000120/dragoncity/images/thumb/4/44/Element_Light.png/15px-Element_Light.png" class="lzyPlcHld lzyTrns lzyLoaded" onload="if(typeof ImgLzy==&quot;object&quot;){ImgLzy.load(this)}" height="30" width="15"> <img id="extab-light" alt="Element Light" src="http://static1.wikia.nocookie.net/__cb20130601000120/dragoncity/images/thumb/4/44/Element_Light.png/15px-Element_Light.png" width="15" height="30" data-image-name="Element Light.png" data-image-key="Element_Light.png" /> - <img id="extab-war" alt="Element War" src="http://static1.wikia.nocookie.net/__cb20130810101750/dragoncity/images/thumb/d/de/Element_War.png/15px-Element_War.png" data-image-name="Element War.png" data-image-key="Element_War.png" data-src="http://static1.wikia.nocookie.net/__cb20130810101750/dragoncity/images/thumb/d/de/Element_War.png/15px-Element_War.png" class="lzyPlcHld lzyTrns lzyLoaded" onload="if(typeof ImgLzy==&quot;object&quot;){ImgLzy.load(this)}" height="30" width="15"> <img id="extab-war" alt="Element War" src="http://static1.wikia.nocookie.net/__cb20130810101750/dragoncity/images/thumb/d/de/Element_War.png/15px-Element_War.png" width="15" height="30" data-image-name="Element War.png" data-image-key="Element_War.png" /> - <img id="extab-pure" alt="Element Pure" src="http://static2.wikia.nocookie.net/__cb20130729011348/dragoncity/images/thumb/5/56/Element_Pure.png/15px-Element_Pure.png" data-image-name="Element Pure.png" data-image-key="Element_Pure.png" data-src="http://static2.wikia.nocookie.net/__cb20130729011348/dragoncity/images/thumb/5/56/Element_Pure.png/15px-Element_Pure.png" class="lzyPlcHld lzyTrns lzyLoaded" onload="if(typeof ImgLzy==&quot;object&quot;){ImgLzy.load(this)}" height="30" width="15"> <img id="extab-pure" alt="Element Pure" src="http://static2.wikia.nocookie.net/__cb20130729011348/dragoncity/images/thumb/5/56/Element_Pure.png/15px-Element_Pure.png" width="15" height="30" data-image-name="Element Pure.png" data-image-key="Element_Pure.png" /> ' );

/* var ttb0 = $( "table.wikitable.dc-dot td.bg-war" ).parents, ttb1 = $( "table.wikitable.dc-dot td.bg-war" ).parents.next, ttb2 = $( "table.wikitable.dc-dot td.bg-war" ).parents.next.next, ttb3 = $( "table.wikitable.dc-dot td.bg-war" ).parents.next.next.next;

$( document ).ready(function { $(ttb0, ttb1, ttb2, ttb3).wrap( "<tbody class='hide-war' />"); });