Hi clickforward,

I do this simple test, and seems to have what expected I hope :))
here is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Draggables</title>

<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="scriptaculous.js?
load=effects,dragdrop"></script>

<style type="text/css">
  .highlight{
    background-color:yellow;
  }
  .highlight2{
    background-color:pink;
  }
</style>

</head>
<body>

<ul id="options-10-list" class="options-list">
<li>
<input id="options_10_2" class="radio" type="radio" value="15"/>
<span class="label">
<label for="options_10_2">Bodoni</label>
</span>
</li>
<li>
<input id="options_10_3" class="radio" type="radio" value="15"/>
<span class="label">
<label for="options_10_3">test2</label>
</span>
</li>
<li>
<input id="options_10_4" class="radio" type="radio" value="15"/>
<span class="label">
<label for="options_10_4">david</label>
</span>
</li>
</ul>

<script type="text/javascript">

$('options-10-list').select('[for="options_10_2"]').each(function(e)
{
console.log(e);
 e.addClassName('highlight');

});
$('options-10-list').select('[for!="options_10_2"]').each(function(e)
{
console.log(e);
 e.addClassName('highlight2');

});

</script>
</body>
</html>

hope that help...

--
david

On 9 oct, 13:51, "clicforw...@googlemail.com"
<clicforw...@googlemail.com> wrote:
> Hi David,
>
> this is the code.
> I think the DOM is generated by Ajax. Maybe this couse the Prob!?
> Thanks for Help.
>
> <ul id="options-10-list" class="options-list">
> <li>
> <input id="options_10_2" class="radio" type="radio" value="15"/>
> <span class="label">
> <label for="options_10_2">Bodoni</label>
> </span>
> </li>
> </ul>
>
> On 9 Okt., 12:43, david <david.brill...@gmail.com> wrote:
>
> > Hi clickforward,
> > could you please send the HTML code with the js code, because I can't
> > catch what is "option-10-list", form element or list element ??
>
> > --
> > david
>
> > On 8 oct, 19:28, "speedpac...@gmail.com" <speedpac...@gmail.com>
> > wrote:
>
> > > I guess the thread I started may help you:
>
> > >http://groups.google.com/group/prototype-scriptaculous/browse_thread/...
>
> > > On Oct 8, 1:01 pm, "clicforw...@googlemail.com"
>
> > > <clicforw...@googlemail.com> wrote:
> > > > Hello anyone,
>
> > > > i try to select a label for="options_10_2" like this:
>
> > > > $('options-10-list').select('[for="options_10_2!"]').each(function(e)
> > > > {
> > > >  e.addClassName('highlight');
>
> > > > });
>
> > > > or this:
>
> > > > $('options-10-list').down(3).each(function(e) {
> > > >  e.addClassName('highlight');
>
> > > > });
>
> > > > But its doing nothing. What wrong on this snippets?
>
> > > > Thanks for Help!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to