Skip to content

Instantly share code, notes, and snippets.

View lorenzo-gasperoni's full-sized avatar

Lorenzo Gasperoni lorenzo-gasperoni

View GitHub Profile
/* Use max-height in the transformation and not height.
/* And set a value on max-height to something bigger than your box will ever get. */
#menu #list {
max-height: 0;
transition: max-height 0.15s ease-out;
overflow: hidden;
background: #d5d5d5;
}
// object
var object = {
label1: 'value1',
label2: 'value2'
};
// cycle object having access to labels and values
Object.keys(person).forEach(function(trait) {
console.log('Person ', trait,': ', person[trait]);
});