Skip to content

Instantly share code, notes, and snippets.

@ericwwsun
Created June 18, 2012 21:03
Show Gist options
  • Save ericwwsun/2950681 to your computer and use it in GitHub Desktop.
Save ericwwsun/2950681 to your computer and use it in GitHub Desktop.
Javascript: Key/Value Array Example
var dropdowns = {
className1: 'classname1',
className2: 'classname2',
className3: 'classname3'
};
for(index in dropdowns) {
if( dropdowns[index] != currentClass) {
$j('.' + dropdowns[index]).dosomething();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment