Creating Table Rulers with the jQuery JavaScript Library
Welcome to the final installment of a series on creating table rulers with CSS and JavaScript. Comprised of four approachable tutorials, this series demonstrates how to build a table ruler by means of several approaches, ranging from utilizing CSS and JavaScript separately, to using a balanced combination of them.
Creating Table Rulers with the jQuery JavaScript Library - Review: building a table ruler using plain JavaScript (Page 2 of 4 )
Before I begin explaining how the jQuery JavaScript library can be used for building a simple table ruler, I'm going to review the hands-on example developed in the preceding tutorial. It demonstrated how this same web application can be created with plain JavaScript.
That being clarified, here’s how the aforementioned example looked originally:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
As you can see, the above code sample shows how to develop a table ruler which can be utilized with multiple HTML tables. For this situation, I coded only a couple of tables to exemplify the use of the table ruler. But as you may guess, it’s perfectly possible to apply this highlighting effect to any number of them.
So far, so good. At this point, you’re hopefully familiar with building a table ruler using plain JavaScript. Next, I’m going to teach you how to recreate the same JavaScript application, but this time with the assistance of the jQuery package.
Want to learn how this will be achieved? Then read the following section.