jquery - html5 lightbox dose not work on ajax loaded <a> link -
i want display data of text file in html5 lightbox.
html5 lightbox working fine when use in link of page.
example :
<a data-height="500" data-width="800" href="hello.txt" class="html5lightbox">hello</a>
it's working in above link. when loading content in datatables ajax , click on link in table it's redirect hello.txt instants of displaying html5 lightbox.
[update]
$('.dynamictable').on('xhr.dt', function ( e, settings, json ) { $(".html5lightbox").html5lightbox(); }).datatable();
it's not working on fired ajax event when ajax request completed.
finally answer of :)
$('.dynamictable').datatable({ "fndrawcallback": function () { $(".html5lightbox").html5lightbox(); }, });
make sour it's helps other working datatable.
Comments
Post a Comment