0

I would like to change prices by the selected options. Actually I use this jQuery-Code.

item.find('select').on('change', function () {
  price_updater($(this));
});

The select dropdown looks like

<select name="products_qty" size="1" class="SumoUnder" tabindex="-1">
  <option value="100">100</option>
  <option value="250">250</option>
  <option value="500">500</option>
  <option value="1000">1000</option>
</select>

The jQuery Code only works when I change the dropdown field. How do I get the first value?

3
  • Add .trigger('change') to the end of your current jQuery Commented Jan 14, 2020 at 11:35
  • Sorry for this double posting but your solution works fine. Commented Jan 14, 2020 at 11:40
  • No problems, glad it solved the issue for you Commented Jan 14, 2020 at 11:41

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.