Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bean outside of Ender but without Ender syntax #94

Closed
mrmartineau opened this issue Oct 24, 2013 · 2 comments
Closed

Use bean outside of Ender but without Ender syntax #94

mrmartineau opened this issue Oct 24, 2013 · 2 comments

Comments

@mrmartineau
Copy link

I have seen and commented on Issue #93 but it doesn't quite answer my problem. I would like to use bean with either qwery or native querySelector(All) but I have had little success. I have asked this on Stack Overflow but not had any response, hence the reason for asking here - view it at http://stackoverflow.com/questions/19490549/can-i-use-qwery-with-bean-without-ender. Could someone please respond there?

@mrmartineau
Copy link
Author

or here.. I don't mind..

@joggink
Copy link

joggink commented Jul 31, 2014

we use bonzo and extend it like this:

    bonzo.aug({
        // bean events
        on: function () {
            var args = [].slice.call(arguments);
            args.unshift('');
            return this.each(function (elem) {
                args[0] = elem;
                return bean.on.apply(this, args);
            });
        },
        one: function () {
            var args = [].slice.call(arguments);
            args.unshift('');
            return this.each(function (elem) {
                args[0] = elem;
                return bean.one.apply(elem, args);
            });
        },
        off: function () {
            var args = [].slice.call(arguments);
            args.unshift('');
            return this.each(function (elem) {
                args[0] = elem;
                return bean.off.apply(elem, args);
            });
        },
        fire: function () {
            var args = [].slice.call(arguments);
            args.unshift('');
            return this.each(function (elem) {
                args[0] = elem;
                return bean.fire.apply(elem, args);
            });
        }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants