What I’m trying to implement is when someone hovers over a table row, I want to show up-and-down arrows on the left side of the table (outside of the table). What is the best way to implement this using html/css or jquery?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do it without any JavaScript – with just plain HTML like this:
CSS
HTML
This is just the basic idea. Keep in mind, that the arrow must have a “connection” with the table row, otherwise they will hide again, when you move towards them (because than you would leave the
:hoverof the<tr>– that’s why thewidthand the amount ofleftare the same in the example).DEMO
jsFiddle
NOTE
I only tested this in Safari. For all other browsers simply move
position: relative;from<tr>to<table>: