Please pardon my poor understanding of javascript basics: I've been using the following method to create an object array of variables:
$.searchfunction = { searchbox: $('#searchinput'), url: 'http://localhost', targetdiv: $('#results'), specifierobj: {}, keyboardid: '#keyboard' }; I'm having trouble with getting the value of $.searchfunction.searchbox. I'm calling it in the following manner: var curval = $.searchfunction.searchbox.val(); This isn't working--I tested this attempt with val() in Firebug and it does not work. I've noticed that if I type in $('#searchinput') in Firebug, the object is different than $.searchfunction.searchbox. Respectively, >>> $.searchfunction.searchbox; Object length=0 context=document selector=#searchinput >>> $('#searchinput'); Object 0=input#searchinput length=1 context=document I know there are jQuery objects and other types of objects, so I am assuming it is a problem with this but I don't understand why the variable does not store the #searchinput in the same manner. Thanks for any help.