New answers tagged

4

If you have pairing defined, you can use mapping method: var map = new Object(); // or var map = {}; map[myKey1] = "subCat1,subCat2"; map[myKey2] = "subCat3,subCat4"; function get(k) { return map[k]; } //Attach event with dropdown selector, of main category. $("#categorySelectorId").change(function(){ var subCategory = $("#subCategorySelectId"); ...



Top 50 recent answers are included