How can I assign an element to variable?
It will remain empty. You can update the reference once you have already added the elements:
// add elements
artifacts = $('.game-artifact');
Take a look at fiddle.
You can wrap it with function which will return current elements:
var artifacts = function(){
return $('.game-artifact');
};
var $artifacts = artifacts();