It seems simple, but I can't figure out how to expand the $ fn namespace.
JS:
(function ($) { $.fn.myorg.level1.level2.myFunction = function (usettings, params) { return this.each(function () {
How to define a namespace chain so that I can write functions like above?
The example I gave is very simple, the namespace is not expected to be very deep, but I need to be able to extend and add functions ... etc. into my name tree optionally. I do not want to redefine the tree for each function / level added.
I have not seen good examples. If I stay at the $ fn level, itโs easy, but it doesnโt make my code as clean and extensible as I need it.
If what I ask is impossible, what is the right approach?
source share