Skip to content

Instantly share code, notes, and snippets.

@nathankleyn
Forked from N30/Mootools_hash_2_jQuery
Created October 25, 2010 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathankleyn/645792 to your computer and use it in GitHub Desktop.
Save nathankleyn/645792 to your computer and use it in GitHub Desktop.
var subcats = cats[foo_barcat_id].subcats;
var subcatHash = $.extend({}, subcats);
$('tr[id^=all_fields_]').each(function() {
if($(this).id == 'all_fields_' + foo_barcat_id) {
$(this).hide();
} else {
$(this).show();
}
});
if(foo_barcat_id == 0 || subcatHash.isEmptyObject()) {
$('#foo_barsubcat_id').options.length = 1;
$('#foo_barsubcat_id').hide();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment