Created
October 25, 2010 20:10
-
-
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!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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