DOM Manipulation with jQuery
Jack L. Franklin · Apress eBooks · 2013
So now you know a fair amount about jQuery and what it can do. You know how to select elements, how to make sure your code only runs after the DOM is loaded, and plenty more. You’ve also taken a look at animations and done some basic manipulation by changing colors of elements using the css() method. What you might not have realized is that animations are manipulation. Previously, you used fadeIn/fadeOut to manipulate the opacity of an element over a period of time. This chapter will focus entirely on manipulation of elements, including: Changing CSS styles with the css() method More animation as you meet jQuery’s animate() method Inserting, removing, and moving elements around the DOM Editing element attributes with attr() A myriad of manipulation methods that jQuery provides