Being completely self-taught without actually reading in JavaScript (this is my job now, believe it or not) is a few things that I accept but don't understand.
The first is the dollar sign.
I understand that it is a shortcut to document.getElementById(), but if I record $and document.getElementById()the console - only to $return a value. However, this value always function()should not be. Element? What gives?
The second problem that I have is what continues to appear in my code, and I try to change the code to fix it. This is the error "... is not a function."
For instance:
if ($.inArray($(div_id).val(), arr) >= 0);
Gives an error .val() is not a function. What for? And how can I use the value div_idto see if it is in the array?