Created
June 25, 2025 09:47
-
-
Save annuman97/edf5a5a70379aef0f962395b95d930e5 to your computer and use it in GitHub Desktop.
If a column contains URLs and users want to enable redirection to that link when clicking anywhere on the row,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function runAll(){ | |
$('.footable tbody tr').click( function() { | |
}).hover( function() { | |
$(this).toggleClass('hover'); | |
$(this).css('cursor', 'pointer'); | |
}); | |
$(document).on('click', '.footable tbody tr', function(e){ | |
e.preventDefault(); | |
var url = $(this).find('a').attr('href'); | |
window.open(url, '_blank'); | |
}); | |
} | |
runAll(); | |
$table.on('after.ft.paging', function () { | |
runAll(); | |
}); | |
$table.on("after.ft.filtering", function () { | |
runAll(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment