Solved

3-rd li from ul

Posted on 2011-09-18
3
297 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Link Anchor Not working 9 67
AJAX Create / Update Not working MVC 5 67
Check for Numeric Phone Field 14 48
How to change normal array form to associative in javascript 1 24
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

752 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