Solved

3-rd li from ul

Posted on 2011-09-18
3
299 Views
Last Modified: 2012-05-12
Hello.

I need to hide the 3-rd li from ul (ul id is "widgetlist_column1")

I think something is wrong here:
 $("#widgetlist_column1").$("li"[2]).hide();

Please help
0
Comment
Question by:radugheorghies
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 36556719
index of the first one is : 0
index of the third one is : 2

Test page : http://jsfiddle.net/f27RY/
using : $("#widgetlist_column1>li:eq(2)").hide();

0
 

Author Closing Comment

by:radugheorghies
ID: 36556749
Thanks
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36556752
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question