The jQuery('some_selector') method will retrieve an array of objects, no
matter how many items exists with that selector.

In your case you should use something like this:

jQuery('#slider.navigation a.selected')[0].id;
                                                                    ^^ (you
missed the array position of the element)


_________________________________
Lois Griffin: I’m a naughty girl and I need a spanking!
Peter Griffin: And I'm a paladin with 18 charisma and 97 hit-points, I can
use my helm of disintegration and do 1d4 damage as my half-mage elf wields
his +5 holy avenger.
Lois Griffin: Wait a minute, paladins can’t use the helm of disentegration!
Peter Griffin: oh — In that case then I’m a black guy.



On Sat, Mar 28, 2009 at 22:46, macsig <sigbac...@gmail.com> wrote:

>
> Hello guys, I'm trying to make some changes to the coda slider effect
> on jqueryfordesigners.com
> Basically what I want is changing the buttons every time I move from a
> panel to an other one.
>
>
> I have the code below:
>
> <div id="slider">
>  <ul class="navigation">
>    <li><a href="#1" id="first">FIRST</a></li>
>    <li><a href="#2" id="second">SECOND</a></li>
>    <li><a href="#3" id="third">THIRD</a></li>
>  </ul>
> ...
> </div>
>
> and the link to the current panel have the class 'selected'
>
> Here the question: how can I retrieve the id of the link with the
> class 'selected'?
>
> I guess it should be something like:  $('#slider .navigation').find
> ('a').XXX('selected').id but I don't know how to put in place of XXX.
>
>
> Thanks
>
>
> Sig
>
>
>
>

Reply via email to