Can you jsfiddle that one up for us so we can play along too? =D Thanks, ~Philip
On Fri, Jun 17, 2011 at 5:27 AM, hamburger <[email protected]> wrote: > 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 -- http://lonestarlightandsound.com/
