jQuery practice #3 - DOM manipulation
jQuery is a Javascript framework. When do we use Javascript, jQuery, jQuery UI DOM Manipulation in jQuery What jQuery does? jQuery is a JavaScript library that can: Access parts of a page Modify the appearance of the page Alter the content of the page Respond to user interaction with the page Add animation to a page Manipulating DOM with jQuery methods 1. To insert new elements inside every matched element, use: .append() .appendTo() .prependTo() .prepend() Example for .prepend() in jQuery HTML: <div class="productsContent one-box"> <div class="box"> <h4> Loreum ipsum1</h4> <p> Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit... </p> </div> </div> Prepending an element using jQuery: $('.productsContent').prepend('November, 2018'); New DOM: $(...