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
From the course: Design the Web: Creating a Sortable Table
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Preparing the HTML file3m 13s
-
(Locked)
Activating the plugin6m 2s
-
(Locked)
Setting a default sort on page load3m 24s
-
(Locked)
Highlighting the sorted column4m 54s
-
(Locked)
Creating CSS triangles to indicate sort order4m 34s
-
(Locked)
Creating custom sort properties8m 16s
-
(Locked)
Where to go from here55s
-