Syncing Dropdown values with Dependencies
-
Hello,
I have two dropdown selectors, both with the same series of values (50, 100, 500, 1000). I have created a script so that when you change the value of one dropdown, the other changes as well to match. This is all working fine.
The problem is…each dropdown value also has a dependency, so when a value is selected, a separate field appears. But this dependency does not trigger when using this script.
Here is what I have so far:
— #dropdownA —
50 (show field 1)
100 (show field 2)
500 (show field 3)
1000 (show field 4)-- #dropdownB -- 50 (show field 5) 100 (show field 6) 500 (show field 7) 1000(show field 8)
My script:
jQuery(document).ready(function($) { var $selects=$('#dropdownA,#dropdownB').change(function(){ $selects.not(this).val( $(this).val() ); })Any help with getting the dependencies to work with this script would be greatly appreciated!
The topic ‘Syncing Dropdown values with Dependencies’ is closed to new replies.