How to set css styles with variables in rails if certain item is selected?

I'm doing the Ryan Bates Sortable Table Columns screencast

If the item is a table and I want to a style if the item is selected how
can I do it?

Attachments:
http://www.ruby-forum.com/attachment/8101/sortable.txt

Juan Mercedes wrote in post #1094911:

I'm doing the Ryan Bates Sortable Table Columns screencast

If the item is inside a th tag and I want to a style if the item is
selected
how
can I do it?

I have attached a quick demo that might help get you started...

Attachments:
http://www.ruby-forum.com/attachment/8103/index.html