jquery-related-selects
jquery-related-selects copied to clipboard
jquery.relatedselects.js is broken
In release 1.1, the following code in jquery.relatedselects.js is different from jquery.relatedselects.min.js and does not work.
// make array of select names
$.each(opts.selects, function(){
selects.push(key);
});
jquery.relatedselects.min.js uses
for (key in opts.selects)
selects.push(key);
In the first form, the value of key is never defined.
-MikeC
It took me a while to figure out but there is actually a rewritten version: https://github.com/ehynds/jquery-related-selects/tree/rewrite
It's working, but the options are different:
$form.relatedSelects({
select_id: {
source: http://mydomain.com/ajax/load/new,
depends: 'parent_select_id'
}
});
Also I fixed a few things that are not still updated in main repository. If you want the fixes see: https://github.com/antitoxic/jquery-related-selects/tree/rewrite