I'm trying to understand why something works the way it does in jQuery. When I want to apply a jQuery extension, for example datatables, I run the command:
$("#some_id").datatables(.. parameters ..);
I don't know why this works, obviously the DOM element didn't have a method datatables() beforehand.
Thanks!
$("#some_id") does not return a HTML DOM element, it returns a JQuery object wrapping it.
This JQuery object does have the datatables method.
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