Suffice it to say, I want to deploy my plugin a bit, and decided that I want to be able to "improvise" them. So far, rewriting $.method to $.namespace.method been easy.
The problem I am facing is to create element methods like $('element').method() , but to use a namespace; e.g. $('element').namespace.method() . I tried several workarounds and can create $.fn.namespace.method , however, when I call this from this method, I get only $.fn.namespace , and not the 'element' that I would like to get.
Example: if I call $('body').namespace.test() , then inside the test method I want this be a <body></body> element
Any help in determining how to do this is greatly appreciated. Probably just changed his mind, as usual.
You are currently trying to find suitable workarounds for something like $('body').namespace().method() , so far not working so well ...: P
source share