Skip to main content

object Key in javascript class/dictionary?



I have a Javascipt object which I use as dictionary







var obj={

xxx:'1'

yyy:'2'

}







However - xxx and yyy should be a jQuery object .





something like :







var obj =

{

$('#div1'):'1' ,

$('#div2'):'2'

}







is it possible ?





also, How can I get the " value " for key $('#div2') ?





p.s. I the $.data cant help me here since its also a key value and i need in the key - object Type also.


Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?