Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/03/2012, 13:20
opzina
 
Fecha de Ingreso: marzo-2008
Mensajes: 1.020
Antigüedad: 16 años, 2 meses
Puntos: 21
Respuesta: (Consulta), chequeo y agregar clase css

Resuelto:

Código Javascript:
Ver original
  1. // Check if each letter has one word load.
  2.         var checkLetter = function(data){
  3.                 getTag(data, 'data').each(function() {
  4.                     getTag(this, 'item').each(function() {
  5.                         getTag(this, 'word').each(function() {
  6.                            
  7.                             var toCheck = $(this).text();
  8.                             //Words are empty?
  9.                             var checked = isPresent(toCheck);
  10.                            
  11.                             $(checked).each(function(key) {
  12.                                 $('.abc li a').each(function () {
  13.                                     letters = $(this).text();
  14.                                     if(letters == toCheck[key]) {
  15.                                         //Add "active" class to each letter if word not empty.
  16.                                         $(this).parent().addClass('active');
  17.                                     }
  18.                                 });
  19.                             });    
  20.                         });
  21.                     });
  22.                 });
  23.         };
__________________
_