jQuery to show only first element in a group

In this post, find jQuery code to show only first element within a group or container or div element. You must have seen this feature on Facebook. If you have not seen, then go to Facebook -> Photos -> Click on Album tab. Take mouse on any album, and you will find other images are getting previewed. But the point is, when the page was loaded only first item was visible and rest were hidden.

Related Post:

To show only first image within div where multiple images are placed.
$("div.List").each(function () {
   $("img :not(:first)", this).hide();
If you have placed any list (ul->li) element, then you can use below code to hide other items.
$("div.List").each(function () {
   $("ul li:not(:first)", this).hide();
Feel free to contact me for any help related to jQuery, I will gladly help you.

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..