I need help understanding $(this)
. Is it possible to narrow the focus of "this" within the parentheses or does "this" preclude the use of any other attributes?
For example: I don't understand why this code:
$(this).children("div")
can't be rewritten like this:
$(this + " div")
without having to resort to something like:
$('#'+$(this).attr("id")+ " div")
Also, can you point me to 'this' in the jQuery documentation? It is difficult to use 'this' as a search term for obvious reasons.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…