That contains() method looks darned useful! Try this in its place:

$$('td').findAll(function(elm){ return elm.innerHTML.include('Pendiente');}).invoke('setStyle','background- color:#c00');

That's the long-hand way, you could probably wrap this up in a function so there wouldn't be any repeated code.

Walter

On Aug 31, 2010, at 9:39 AM, VEO creativos wrote:

Hi! I'm trying to assign a CSS style to a TR that contains the words
"Pendiente", "Procesando" and "Completo".
I've made this for jQuery, but I need to do it with prototype/
scriptaculous and I'm a totally newbie.

Thanks in advance for any help!

This is the code I've made for jQuery:
<script>
 $("td:contains('Pendiente')").css("background", "#c00");
 $("td:contains('Procesando')").css("background", "#0c0");
 $("td:contains('Completo')").css("background", "#000");
</script>

Thanks!!

--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en .


--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to