javascript - jquery change current row class -


i have table rows in it.

i want highlight different rows use down or enter key. have keypress event working i'm having issue changing current row original non-highlighted class.

i have figured out how change value of next row, need reset value row i'm coming from.

this code i'm using change next "tr" highlighted class:

$(a).closest("tr").next().toggleclass("lugridrowhighlight"); 

please let me know.

update:

i have table 5 rows of data. keypress code move or down table 5 rows

"a" represents tablerow element

when press down arrow (keycode 40) want change selected row has class lugridrowhighlight lugridrow. want change row below highlight class.

right can change row below highlighted class. want change class of row i'm coming from.

you can set of "non-highlighted" rows "non-highlighted" class:

 $('#table_id tr').removeclass("lugridrowhighlight"); 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -