%STARTINCLUDE%
<script type="text/javascript">
/* Function markChildNodes( parent, childTag, markList )
** - parent: parent element where to search by child nodes to mark. May be a id string.
** - childTag: the tag name to search inside parent.
** - markList: an array of marks to be attached sequentially, like ["even","odd"].
** The values on markList will be added as className inside each matched child on the
** DOM sequence.
*/
function markChildNodes( parent, childTag, markList ) {
if ( typeof(parent) == "string" ) { parent = document.getElementById(parent) }
childTag = childTag.toUpperCase()
var childs = parent.childNodes;
var pos = 0;
for ( var el,i=0; el=childs[i]; i++ ) {
if ( el.tagName == childTag ) {
el.className = " " + markList[pos];
pos++;
pos = pos % markList.length;
}
}
}
</script>
%STOPINCLUDE%
Software Livre
Missão, Visão e Valores
Contribuição para a Comunidade
Blog |
Identi.ca |
Twitter
Créditos ♥
Rua Marechal Floriano, nº 28,
ed. Norma Camozzato, sala 301
Canela - Salvador - Bahia - Brasil
CEP: 40110-010
Telefones: +55-71-3331-2299
+55-71-3011-2199