Do you need to place Knockout.js custom binding handlers (not knockout itself but binding handlers) in a jQuery's document.ready or is it safe to assume they will only fire the init and update functions after the DOM has loaded (Knockout will do it for you)?
Custom binding handlers should be registered after Knockout has been loaded, but before ko.applyBindings is called, as it is when ko.applyBindings is called that the init and update functions of the bindings are called by Knockout (if there is an element in the DOM that is using that particular binding).
The call to ko.applyBindings should only happen when the DOM is ready, as explained here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With