title: On page load I am trying to unhide multiple dropdowns in a div if any of the dropdowns have an option selected
body: <p>I have five hidden drop-downs in a div that are dynamically populated with an option selected if required by the data.</p>
  <p>I need to display the drop-downs that have an option selected but not if the value is 0.</p>
  <p>My code tried so far:</p>
  <pre><code>$('.sendingCriteria').each(function () {
      $(':selected', this).each(function (e) {
          let $this = $(this);
          if ($this.value() != 0) {
              $(this).css('display', 'block');
          }
      });
  });
  </code></pre>
  <p>The CSS:</p>
  <pre><code>.timeOfDay,.dayOfWeek,.dayOfMonth,.mnthOfYr{
      display: none;
  }
  
  .freqSelectors{
      display:none;
  }
  </code></pre>
  <p>The HTML:</p>
  <pre><code>&lt;div class=&quot;sendingCriteria&quot;&gt;
      &lt;div class=&quot;clearfix&quot;&gt;
          &lt;span class=&quot;bi bi-question-circle-fill&quot; data-help=&quot;help5&quot;&gt;&lt;/span&gt;
          &lt;div class=&quot;manualAuto&quot;&gt;
              &lt;div class=&quot;form-check form-switch manAuto&quot;&gt;
                  &lt;input class=&quot;form-check-input&quot; type=&quot;checkbox&quot; name=&quot;manAuto&quot; id=&quot;manAuto&quot; value=&quot;1&quot; checked=&quot;checked&quot;&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;freqSelectors&quot;&gt;
              &lt;div class=&quot;freq&quot;&gt;
                  &lt;label class=&quot;form-label&quot; for=&quot;frequency&quot;&gt;Frequency&lt;/label&gt;
                  &lt;select id=&quot;frequency&quot; name=&quot;frequency&quot; class=&quot;form-select&quot; aria-label=&quot;Select Frquency&quot;&gt;
                      &lt;option value=&quot;0&quot;&gt;-- Select --&lt;/option&gt;&lt;option value=&quot;d&quot; selected=&quot;selected&quot;&gt;Daily&lt;/option&gt;&lt;option value=&quot;w&quot;&gt;Weekly&lt;/option&gt;&lt;option value=&quot;m&quot;&gt;Monthly&lt;/option&gt;&lt;option value=&quot;a&quot;&gt;Annually&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/div&gt;
              &lt;div class=&quot;timeOfDay Daily Weekly Monthly Annually&quot;&gt;
                  &lt;label class=&quot;form-label&quot; for=&quot;timeOfDay&quot;&gt;Time of Day&lt;/label&gt;
                  &lt;select id=&quot;timeOfDay&quot; name=&quot;timeOfDay&quot; class=&quot;form-select&quot; aria-label=&quot;Select Time&quot;&gt;
                      &lt;option value=&quot;0&quot;&gt;-- Select --&lt;/option&gt;&lt;option value=&quot;1&quot;&gt;01:00&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;02:00&lt;/option&gt;&lt;option value=&quot;3&quot;&gt;03:00&lt;/option&gt;&lt;option value=&quot;4&quot;&gt;04:00&lt;/option&gt;&lt;option value=&quot;5&quot;&gt;05:00&lt;/option&gt;&lt;option value=&quot;6&quot;&gt;06:00&lt;/option&gt;&lt;option value=&quot;7&quot;&gt;07:00&lt;/option&gt;&lt;option value=&quot;8&quot;&gt;08:00&lt;/option&gt;&lt;option value=&quot;9&quot;&gt;09:00&lt;/option&gt;&lt;option value=&quot;10&quot;&gt;10:00&lt;/option&gt;&lt;option value=&quot;11&quot;&gt;11:00&lt;/option&gt;&lt;option value=&quot;12&quot;&gt;12:00&lt;/option&gt;&lt;option value=&quot;13&quot;&gt;13:00&lt;/option&gt;&lt;option value=&quot;14&quot;&gt;14:00&lt;/option&gt;&lt;option value=&quot;15&quot; selected=&quot;selected&quot;&gt;15:00&lt;/option&gt;&lt;option value=&quot;16&quot;&gt;16:00&lt;/option&gt;&lt;option value=&quot;17&quot;&gt;17:00&lt;/option&gt;&lt;option value=&quot;18&quot;&gt;18:00&lt;/option&gt;&lt;option value=&quot;19&quot;&gt;19:00&lt;/option&gt;&lt;option value=&quot;20&quot;&gt;20:00&lt;/option&gt;&lt;option value=&quot;21&quot;&gt;21:00&lt;/option&gt;&lt;option value=&quot;22&quot;&gt;22:00&lt;/option&gt;&lt;option value=&quot;23&quot;&gt;23:00&lt;/option&gt;&lt;option value=&quot;24&quot;&gt;24:00&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/div&gt;
              &lt;div class=&quot;dayOfWeek Weekly Annually&quot;&gt;
                  &lt;label class=&quot;form-label&quot; for=&quot;dayOfWeek&quot;&gt;Day of the Week&lt;/label&gt;
                  &lt;select id=&quot;dayOfWeek&quot; name=&quot;dayOfWeek&quot; class=&quot;form-select&quot;&gt;
                      &lt;option value=&quot;0&quot; selected=&quot;selected&quot;&gt;-- Select --&lt;/option&gt;&lt;option value=&quot;1&quot;&gt;Monday&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;Tuesday&lt;/option&gt;&lt;option value=&quot;3&quot;&gt;Wednesday&lt;/option&gt;&lt;option value=&quot;4&quot;&gt;Thursday&lt;/option&gt;&lt;option value=&quot;5&quot;&gt;Friday&lt;/option&gt;&lt;option value=&quot;6&quot;&gt;Saturday&lt;/option&gt;&lt;option value=&quot;7&quot;&gt;Sunday&lt;/option&gt;&lt;option value=&quot;9&quot;&gt;Week Day&lt;/option&gt;&lt;option value=&quot;10&quot;&gt;Weekend&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/div&gt;
              &lt;div class=&quot;dayOfMonth Monthly Annually&quot;&gt;
                  &lt;label class=&quot;form-label&quot; for=&quot;dayOfMonth&quot;&gt;Day of the Month&lt;/label&gt;
                  &lt;select id=&quot;dayOfMonth&quot; name=&quot;dayOfMonth&quot; class=&quot;form-select&quot; aria-label=&quot;Select Month&quot;&gt;
                      &lt;option value=&quot;0&quot; selected=&quot;selected&quot;&gt;-- Select --&lt;/option&gt;&lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;2&lt;/option&gt;&lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;&lt;option value=&quot;4&quot;&gt;4&lt;/option&gt;&lt;option value=&quot;5&quot;&gt;5&lt;/option&gt;&lt;option value=&quot;6&quot;&gt;6&lt;/option&gt;&lt;option value=&quot;7&quot;&gt;7&lt;/option&gt;&lt;option value=&quot;8&quot;&gt;8&lt;/option&gt;&lt;option value=&quot;9&quot;&gt;9&lt;/option&gt;&lt;option value=&quot;10&quot;&gt;10&lt;/option&gt;&lt;option value=&quot;11&quot;&gt;11&lt;/option&gt;&lt;option value=&quot;12&quot;&gt;12&lt;/option&gt;&lt;option value=&quot;13&quot;&gt;13&lt;/option&gt;&lt;option value=&quot;14&quot;&gt;14&lt;/option&gt;&lt;option value=&quot;15&quot;&gt;15&lt;/option&gt;&lt;option value=&quot;16&quot;&gt;16&lt;/option&gt;&lt;option value=&quot;17&quot;&gt;17&lt;/option&gt;&lt;option value=&quot;18&quot;&gt;18&lt;/option&gt;&lt;option value=&quot;19&quot;&gt;19&lt;/option&gt;&lt;option value=&quot;20&quot;&gt;20&lt;/option&gt;&lt;option value=&quot;21&quot;&gt;21&lt;/option&gt;&lt;option value=&quot;22&quot;&gt;22&lt;/option&gt;&lt;option value=&quot;23&quot;&gt;23&lt;/option&gt;&lt;option value=&quot;24&quot;&gt;24&lt;/option&gt;&lt;option value=&quot;25&quot;&gt;25&lt;/option&gt;&lt;option value=&quot;26&quot;&gt;26&lt;/option&gt;&lt;option value=&quot;27&quot;&gt;27&lt;/option&gt;&lt;option value=&quot;28&quot;&gt;28&lt;/option&gt;&lt;option value=&quot;29&quot;&gt;29&lt;/option&gt;&lt;option value=&quot;30&quot;&gt;30&lt;/option&gt;&lt;option value=&quot;31&quot;&gt;31&lt;/option&gt;&lt;option value=&quot;32&quot;&gt;Last day&lt;/option&gt;&lt;option value=&quot;33&quot;&gt;First Monday&lt;/option&gt;&lt;option value=&quot;34&quot;&gt;First Tuesday&lt;/option&gt;&lt;option value=&quot;35&quot;&gt;First Wednesday&lt;/option&gt;&lt;option value=&quot;36&quot;&gt;First Thurday&lt;/option&gt;&lt;option value=&quot;37&quot;&gt;First Friday&lt;/option&gt;&lt;option value=&quot;38&quot;&gt;First Saturday&lt;/option&gt;&lt;option value=&quot;39&quot;&gt;First Sunday&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/div&gt;
              &lt;div class=&quot;mnthOfYr Annually&quot;&gt;
                  &lt;label class=&quot;form-label&quot; for=&quot;dmnthOfYr&quot;&gt;Month of the Year&lt;/label&gt;
                  &lt;select id=&quot;dmnthOfYr&quot; name=&quot;dmnthOfYr&quot; class=&quot;form-select&quot;&gt;
                      &lt;option value=&quot;0&quot; selected=&quot;selected&quot;&gt;-- Select --&lt;/option&gt;&lt;option value=&quot;1&quot;&gt;January&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;February&lt;/option&gt;&lt;option value=&quot;3&quot;&gt;March&lt;/option&gt;&lt;option value=&quot;4&quot;&gt;April&lt;/option&gt;&lt;option value=&quot;5&quot;&gt;May&lt;/option&gt;&lt;option value=&quot;6&quot;&gt;June&lt;/option&gt;&lt;option value=&quot;7&quot;&gt;July&lt;/option&gt;&lt;option value=&quot;8&quot;&gt;August&lt;/option&gt;&lt;option value=&quot;9&quot;&gt;September&lt;/option&gt;&lt;option value=&quot;10&quot;&gt;October&lt;/option&gt;&lt;option value=&quot;11&quot;&gt;November&lt;/option&gt;&lt;option value=&quot;12&quot;&gt;December&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;help help5&quot; style=&quot;display: none;&quot;&gt;Choose the frequency for generating this notificaton&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>