What does $ ({}) mean in jQuery?
This means "pass an empty object to jQuery and create a jQuery object from it."
How does this affect the DOM and what happens literally?
It does not affect the DOM at all, it just changes the value of the property of the {alpha:1} object over time.
You can use some jQuery methods for simple objects, as described in the documentation. Although, it seems, it is a little outdated, since animate is not listed there. But it really works:
> $({alpha:1}).animate({alpha:0}, {step: function() { console.log(this.alpha); }}) 1 0.9965342284774632 0.9870866934849247 0.9730426794137726 0.9524135262330098 0.9242551074907518 0.8926584654403724 0.8563192594626027 ...
source share