I have a datatable with a data-href inside to create a link to a forum page, My issue lies in the place that my datatable link works great on page one, but when I go to page two I can no longer follow the link,but it still has all the data of a link when I inspect element. My JS and Style for the link within the datatable
<style>
tr.clickable-row { cursor: pointer; }
tr.clickable-row:hover { background-color:#F0F8FF;}
</style>
<script>
jQuery(document).ready(function($) {
$(".clickable-row").on('click',$('.clickable-row'),function() {
window.document.location = $(this).data("href");
});
});
</script>
All rows are called upon by MySQL tables to populate the data and are pulled correctly.
echo "<tr class='clickable-row' data-href='viewPage.php?id=".inv_forum_page()."&forum=".$forum['id']."'>
<td>".$authorname."</td><td>".$posttype."".$forum['subject']."</td><td>".$forum['replies']."</td><td>".$forum['views']."</td>
</tr>";
I don't feel like posting the entire function as it's quite a bit of code when I don't believe it's the issue since it works on page one I believe it has to do with my Jquery, but if you want to look at the function itself it is on github under https://github.com/Doxramos/Invontrol/blob/master/plugins/inv_forum/functions.php line 75-123 I read on delegated events and I believe that that's scripted correctly, s I'm not sure what the issue is at this point.