I think that i read something that said that it is better for code like this:
var id1 = $(this).attr('id')
var id2 = $(this).parent().parent().parent().parent().parent().attr('id')
var text = $(this).text()
..to give one variable like $this = $(this) and then use it instead of every $(this). I don’t know where i read this, so my question is that is it true?
yes you can