Solved

3-rd li from ul

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTTPS jquery doesn't work 9 61
Delay Form Submission without touching existing code? 5 22
How to show span when clicked on? 10 21
DataTables + iCheck + pagination Issue 2 22
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

773 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