For example: I want to create a shortcut for an array of elements
var $artifacts = $('.game-artifact');
but atm there are no such elements with such a class. Then code appears that adds the elements. The question is, after I add these elements, the $ artifact variables will still refer to them or will they remain empty? If so, how do I manage to assign a function reference to a variable?
source share