• Skip to primary navigation
  • Skip to main content

Genesis Community

Resources for Genesis WordPress Theme Users

  • Facebook
  • Twitter
  • Slack
  • Wiki
  • Login
You are here: Home / Wikis / JS / Resetting select menu value in all other select menus

Resetting select menu value in all other select menus

In a group of select menus sometimes you may want to reset all other select menus to their first value (typically something like “Select”) when a value is selected in one of the dropdowns.

var selectMenus = $(".products-filter .filters-select");

$.each($(selectMenus), function() {
  $(this).change(function() {
    $(selectMenus)
      .not(this)
      .prop("selectedIndex", 0);
  });
});

Source: https://stackoverflow.com/a/7445661/778809
Notes:

Sample HTML: https://pastebin.com/raw/E0FDJjvE

Posted by: Sridhar Katakam Category: JS

« Toggle an element when a button is clicked
Bookmarklet to include jQuery in Chrome’s console »

Copyright © 2025 · Genesis Sample on Genesis Framework · WordPress · Log in