I created a simple html that enumerates names, with people's names on it as classes. I then get the class name and check it against the array. the result is undefined. here's my code:
var prof_name = $(this).attr('class');
var n = prof_name.split(' ');
var name_out = n[0];
var nameList = {'rom':'Rommel Santiago','holy':'Holiander Fields'};
var nameValue = nameList.nameout;
alert(nameValue); //this pops up as undefined
alert(nameList.rom) // this pops up as 'Rommel Santiago'
What did i missed?
thanks.