May 2017
Intermediate to advanced
448 pages
10h 10m
English
When working with .animate(), it's important to keep in mind the limitations that CSS imposes on the elements that we wish to change. For example, adjusting the left property will have no effect on the matching elements unless those elements have their CSS position set to relative or absolute. The default CSS position for all block-level elements is static, which accurately describes how those elements will remain if we try to move them without first changing their position value.
In our stylesheet, we could set <div id="switcher"> to be relatively positioned:
#switcher { position: relative; ...Read now
Unlock full access