← Back to the Vanilla JS Academy

DOM Manipulation Library

All of the fun here happens in the console. Copy/paste the following examples into the console and run them.

// Create new instance
var btns = new $('button');

// Chain methods together
btns.addClass('btn-purple').removeClass('btn-blue').after('Hello, world!');

// Append some HTML
new $('ul').append('<li>Item A</li><li>Item B</li><li>Item C</li>')