Thanks a lot! And no, this is not a homework. I'm just new to JQuery, and
it's a work problem.
Thanks again!


Scott Sauyet-2 wrote:
> 
> On Nov 17, 3:52 pm, szuwei <sweit...@hotmail.com> wrote:
>> If you have an unordered list with 10 elements. The list has an ID of
>> “myList”.  Using jQuery, how can you:  
>>
>>    1. Change the fore color of all even list items to red
>>    2. Indent the 5th item when the mouse hovers over it
> 
> Is this a homework problem?  I guess if it is, your instructor
> probably knows enough to monitor this list too.
> 
> It's pretty straightforward:  (http://jsbin.com/esole/edit)
> 
>   $("#myList li").filter(":odd").css({color: "red"}).end()
>           .eq(4).hover(function(){$(this).css({textIndent: "2em"})},
>                        function(){$(this).css({textIndent: "0"})});
> 
> Cheers,
> 
>   -- Scott
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Unordered-List-question%21-tp26396471s27240p26399421.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to