Solved

3-rd li from ul

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now