[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 :)

[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: div id=section class=section1 Stuff /div div id=section class=section2 Stuff /div div id=section class=section3 Stuff /div div id=section class=section4 Stuff /div div id=section

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

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

[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... script $(function(){ $('#switcher .section').click(function() {         $('#switcher

[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? html head style .section { border:1px solid silver; background:#EEE; margin:-5px; } .highlight { border: 1px solid red; background: #FFCC99; } /style script $(function(){ // selected Item function var selectedItem = null; var

[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-15 Thread Michael Price
yabado wrote: div id=section class=section1 Stuff /div div id=section class=section2 Stuff /div div id=section class=section3 Stuff /div div id=section class=section4 Stuff /div div id=section class=section5 Stuff /div If this isn't pseudo-code then you've got your IDs and classes the wrong