Skip to content

Instantly share code, notes, and snippets.

@N30
Created October 25, 2010 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save N30/645640 to your computer and use it in GitHub Desktop.
Save N30/645640 to your computer and use it in GitHub Desktop.
first time using gist, trying to use alternative for a shor use of mootools hash!
var subcats = cats[foo_barcat_id].subcats;
var subcatHash = new Hash(subcats);
$$('tr[id^=all_fields_]').each(function(el) { if(el.id == 'all_fields_'+foo_barcat_id) { el.style.display = ''; } else { el.style.display = 'none'; }});
if(foo_barcat_id == 0 || subcatHash.getValues().length == 0) {
$('foo_barsubcat_id').options.length = 1;
$('foo_barsubcat_id').style.display = 'none';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment