From the course: Design the Web: Creating a Sortable Table

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Activating the plugin

Activating the plugin

- [Voiceover] Now with our JavaScript files hooked in let's go back to our exercise files. Inside of the Assets folder let's open up design_the_web.js up in our Text Editor. So the first thing we're gonna do here is use jQuery's document.ready so that we can write some instructions that will fire once the browser has loaded all of the HTML. So let's come in here and delete this comment. Let's hit a few returns. To create a document.ready in jQuery we start with a dollar sign, beginning and ending parentheses, inside of the parentheses we're gonna type in the word "document," then outside of the parentheses we're gonna type ".ready." Another set of parentheses and a semicolon, and then inside of the parentheses for ready, we're gonna type in an anonymous function. So we'll type in the word "function," beginning and ending parentheses, beginning and ending bracket, get our cursor between the brackets and let's split this open. And now any instructions we write inside of here will only…

Contents