User talk:Antimon

This article and other parts of wikiaoc.com provide a quick introduction to the topic. If you are looking for an in-depth guides from level 1 to 70, we can recommend Killer Guides' Age of Conan Guides. You can also take a look at our review of some of their aoc guides first.

From WikiAOC

Jump to: navigation, search

[edit] Color Alternater

I'm considering to add this to site js. It could help creating alternated colors for table rows. For guild member listings etc..

function createAlternatedColors() {
	var elements = document.getElementsByTagName("table");
	for (var i = 0; i < elements.length; i++) {
		if (elements[i].className == "calternate") {
			var rows = elements[i].getElementsByTagName("tr");
			var index  = 0;
			for (var j = 0; j < rows.length; j++) {
				if (rows[j].className != "nocalternate") {
					rows[j].style.backgroundColor = (index++ % 2) == 0 ? "#121C29" : "#1A2634";
				}
			}
		}
	}
}

addOnloadHook( createAlternatedColors );

So, this:

{|class="calternate" style="width: 500px; text-align:center;" cellspacing="1"
|-class="nocalternate" bgcolor="#2A3C52"
| '''Member Name'''
| '''Location'''

|-
| PWnorz
| The Noobland

|-
| Raistlin
| Krynn
|}


should turn into something like this:

Member Name Location
PWnorz The Noobland
Raistlin Krynn


Of course, when used with templates, any guild can build member lists easily like this:

{{BeginMemberList}}

{{Member|PWnorz|The Noobland}}
{{Member|Raistlin|Krynn}}

{{EndMemberList}}

Just thought it might help :) Gonna check if it runs smooth on large lists.

Personal tools
Level 1 to 70 Insider Guide:
mmobux
ads