preInit event doesn't fire
preInit event doesn't fire

Hi.
I can't seem to get the preInit.dt event to fire (or at least to catch it).
With this code:
$(function() {
$(document).on('preInit.dt init.dt', function (ev, settings) {
console.log(ev);
});
});
I get:
Is there something I'm doing wrong or missing?
Thanks in advance.
This discussion has been closed.
Answers
Your code works here:
http://live.datatables.net/patakeye/1/edit
In order to help debug please provide a link to your page or a test case replicating the issue.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
I've found it! The problem is I'm registering the events on the
$(document).ready()
callback. If I do it outside of it it seems to work fine.Hope it doesn't mess up anything else...
Thanks for the help!