H
H
Homakov2011-06-21 18:12:11
JavaScript
Homakov, 2011-06-21 18:12:11

jQuery - postfix usage?

Help to make such a thing so that instead of $(element )
.action you can use element.$.action
().action is no longer cool.
Your ideas?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Riateche, 2011-06-21
@Homakov

You want something very strange and wrong, but still:
Object.prototype.__defineGetter__('$', function() { return jQuery(this);})
Works not everywhere (checked in Chrome, in theory it should still work in Firefox).
After that, the global function $() will break (jQuery() will remain).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question