Datatables with colorbox links
Datatables with colorbox links
I am using a href
links in my data tables. These links work on the first page of the table, but stops working on other pages. By 'pages' I am referring to datatable's pagination.
However, these links are sightly special: when clicked these links display pdf documents that pops out on a 'colorbox' overlay. Colorbox is a jquery api ( http://www.jacklmoore.com/colorbox/ ) for displaying images, etc as an overlay. My links are:
<a class="iframe" href="somelink.pdf">click</a>
And my colorbox initialization for these links is a one liner in $(document).ready
:
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
This question has an accepted answers - jump to answer
Answers
Try:
$('.iframe', table.rows().nodes()).colorbox( ... );
. See also the top FAQ.Allan