hello again,
may be somebody can help me again.
i do not know how to grab an object-value with a variable
var Anzeigen = {
'schlicht' : { 'decription':'beschreibungstext',
'noFeatured' : ['blue','red'] },
'anzeige_2' : { 'decription':'beschreibungstext',
'noFeatured' : ['blue','red'] }
};
var anzName = $('anzeige').getProperty('class').split(' ')[0]; //
gives "schlicht"
do not works
if(Anzeigen.anzName){
log('stuff exists and is: ' +
Anzeigen.anzName.decription);
}
works
if(Anzeigen.schlicht){
log('stuff exists and is: ' +
Anzeigen.schlicht.decription);
}
http://jsfiddle.net/tRRYS/
thx for any help