How do I count the number of s in a DOM element using jQuery?
Your question is a little confusing, but assuming you want to display the number of options in a panel:
and
$(function() { $("#preview").text($("#input1 option").length + " items"); });
Not sure I understand the rest of your question.