I'm not sure how I would phrase this question, so I couldn't find anything online about it, but what reason would one have to 'select' an element twice with jquery? An app I'm trying to understand has multiple examples of this contained within it.
var t = $($("#slider li")[currentIndex]);
IPS.SetTheme($($("#slider li")[currentIndex]));
$($("#location li")[currentIndex]).addClass("selected");
Is it similar to why this
is occasionally written as $(this)
for scope reasons?