[jQuery] Re: div select and change it's css

2008-02-23 Thread yabado
Very kewl, but any tips on getting the key up / key down navigation hooked up as well? On Feb 16, 10:02 am, George <[EMAIL PROTECTED]> wrote: > > jQuery being what it is, there's bound to be a way of doing > > this in one line, though :) > > $(this).addClass("highlight").siblings().removeClass(

[jQuery] Re: div select and change it's css

2008-02-16 Thread George
> jQuery being what it is, there's bound to be a way of doing > this in one line, though :) $(this).addClass("highlight").siblings().removeClass("highlight") ...that saves a document wide search for $(".section") Geoge

[jQuery] Re: div select and change it's css

2008-02-16 Thread yabado
Here is what I have, but the key event do not work? .section { border:1px solid silver; background:#EEE; margin:-5px; } .highlight { border: 1px solid red; background: #FFCC99; } $(function(){ // selected Item function var selectedItem = null; var setSelectedItem = function(item) {

[jQuery] Re: div select and change it's css

2008-02-16 Thread yabado
Can someone suggest a way to add some keycode events to this? up-arrow and down-arrow actions? On Feb 16, 6:31 am, yabado <[EMAIL PROTECTED]> wrote: > Michael, > > I had to change some things but this works... > > > $(function(){ > > $('#switcher .section').click(function() { >         $('#swit

[jQuery] Re: div select and change it's css

2008-02-16 Thread yabado
Michael, I had to change some things but this works... $(function(){ $('#switcher .section').click(function() {         $('#switcher .section').removeClass('highlight');         $(this).addClass('highlight'); }); }); On Feb 15, 8:46 am, Michael Price <[EMAIL PROTECTED]> wrote: > yabado

[jQuery] Re: div select and change it's css

2008-02-16 Thread yabado
Thanks, exactly what I needed. :-) On Feb 15, 8:46 am, Michael Price <[EMAIL PROTECTED]> wrote: > yabadowrote: > > Stuff > > Stuff > > Stuff > > Stuff > > Stuff > > If this isn't pseudo-code then you've got your IDs and classes the wrong > way round here, I think... > > Anyway, the

[jQuery] Re: div select and change it's css

2008-02-15 Thread Michael Price
yabado wrote: Stuff Stuff Stuff Stuff Stuff If this isn't pseudo-code then you've got your IDs and classes the wrong way round here, I think... Anyway, the way I usually do it (and someone will be along shortly with a better method, I don't doubt, but it works for me) is have