Applications of super-mathematics to non-super mathematics. Unless you just want to loop through each input contained in the table, in which case MJB 's answer is correct. If you order a special airline meal (e.g. How do I check whether a checkbox is checked in jQuery? adelynch Re: [jQuery] Loop thru options of a Select box 14 years ago $ (function () { $ ("#state option").each (function (i) { alert ($ (this).text () + " : " + $ (this).val ()); }); }); Will do it. How to get the children of the $(this) selector? But this answer gave the hint to my problem. Adrian kokoglen This way we will . Asking for help, clarification, or responding to other answers. Here's a template of what you should be doing: $("#state").change() ensures that your AJAX code is fired anytime the value of is changed. When you know the required value from the select dropdown options, you can select that option using jQuery. The above example contains a dropdown with three options. The OpenJS Foundation has registered trademarks and uses trademarks. Making statements based on opinion; back them up with references or personal experience. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. With a click of the button, jQuery sets the specified value of the select dropdown option. This was soo, cruel :) I am at 10th alert of my 200 long list of options ;), https://select2.org/programmatic-control/add-select-clear-items, The open-source game engine youve been waiting for: Godot (Ep. Note also the <button>, whose role it is to trigger fetching the HTMLCollection of selected elements using the selected property. An existing jQuery object to match the current set of elements against. These are not interchangeable. Launching the CI/CD and R Collectives and community editing features for Javascript access html select options and change background color of options, Javascript loop through ALL HTML select