make a row active on hover
-
Hi Tobias
I have a table with multiple rows and have a link in the first column of each row. I have added css so if you hover over the link an image appears to the right of the table (desktop only).
I would like to add relevant code so if you hover over any part of the row the image appears.
I found the code below on a similar thread where someone was trying to link a row on click. I have added this code to my page, changed the table id and it doesn’t work. I have also tried changing the ‘click’ to ‘hover’ and still no good.
Any ideas?
this is my url:
https://www.dev.niftymarketing.co.uk/twisted.co.uk/the-course/scorecard/this is the code i copied form another thread…
<script type=”text/javascript”>
jQuery(document).ready(function($){
$(‘.tablepress-id-1’).on( ‘click’, ‘tr’, function() {
var $a = $(this).find(‘a’).last();
if ( $a.length )
window.location = $a.attr(‘href’);
} );
});
</script>
- The topic ‘make a row active on hover’ is closed to new replies.