I have a div element which my code will fill with a dynamic amount of links. Using jquery, I want to hide all the links except the first one. This is what I came up with and it works, I was just wondering if this is the best way to do it:
$("#panelContainer").each(function(n) {
$(this).children().hide();
$("#panelContainer a:first").show();
});