Conditionally setting CSS style from ruby controller

前端 未结 5 1589
没有蜡笔的小新
没有蜡笔的小新 2021-02-01 11:07

I\'m trying to dynamically change (if it got clicked) a normal table header (which is a link) to another defined CSS class \'th.hilite\'. This link simply sorts this column and

5条回答
  •  天涯浪人
    2021-02-01 11:46

    You should use JavaScript to do this. I think it's good idea for you to use jQuery instead of pure JavaScript. Here are some examples

    http://api.jquery.com/click/

    http://api.jquery.com/css/

提交回复
热议问题