I'm very new at this.
1. I'm using showcase for an RPG and would like to display "Races" and "Sub-Races" dropdown menus via Custom Fields when creating an item.
2. I would like the options of Sub-Races to change dynamically and be based upon the selection of the previous dropdown menu, Races.
3. I would like to do this via this jquery snippet I found (unless there's a better/easier way), and am wondering how I might go about using it to my advantage.
Demo Link: http://jsfiddle.net/3UWk2/1/
Stackexchange Discussion: http://stackoverflow.com/questions/...dropdown-based-on-previous-dropdown-selection
I'm assuming the Showcase Custom Field Dropdown Menu would be replacing the HTML the dude in the Stackexchange Discussion is using, so I'd be using values like $fieldID. I'm also curious what $value I'd use for the Options of the Dropdown Menus, like what's the correct syntax for fetching it.
Any help would be mucho appreciated!
1. I'm using showcase for an RPG and would like to display "Races" and "Sub-Races" dropdown menus via Custom Fields when creating an item.
2. I would like the options of Sub-Races to change dynamically and be based upon the selection of the previous dropdown menu, Races.
3. I would like to do this via this jquery snippet I found (unless there's a better/easier way), and am wondering how I might go about using it to my advantage.
$(document).ready(function() {
$('#Rank').bind('change', function() {
var elements = $('div.container').children().hide(); // hide all the elements
var value = $(this).val();
if (value.length) { // if somethings' selected
elements.filter('.' + value).show(); // show the ones we want
}
}).trigger('change');
});
Demo Link: http://jsfiddle.net/3UWk2/1/
Stackexchange Discussion: http://stackoverflow.com/questions/...dropdown-based-on-previous-dropdown-selection
I'm assuming the Showcase Custom Field Dropdown Menu would be replacing the HTML the dude in the Stackexchange Discussion is using, so I'd be using values like $fieldID. I'm also curious what $value I'd use for the Options of the Dropdown Menus, like what's the correct syntax for fetching it.
Any help would be mucho appreciated!