How does the jQuery tag $(this) exactly work? I know how to use it, but how does jQuery know which element is ‘active’? And what is the original Javascript tag for getting the current item, or is it jQuery only?
How does the jQuery tag $(this) exactly work? I know how to use it,
Share
The
thisis a simple javascript (DOM) object,$(this)will turn the object into a jQuery object.jQuery doesn’t need to ‘know’ what
thisis, it doesn’t treat this in a special way, no other thanmyHeaderDivin