Datatables with colorbox links

Datatables with colorbox links

cranworthcranworth Posts: 20Questions: 10Answers: 0
edited August 2014 in DataTables 1.10

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

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin
    Answer ✓

    Try: $('.iframe', table.rows().nodes()).colorbox( ... );. See also the top FAQ.

    Allan

This discussion has been closed.