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

Lightbox doesn't work with YUI 3.3 because the deprecated Y.get method has been removed #6

Open
carey opened this issue Jan 16, 2011 · 3 comments

Comments

@carey
Copy link

carey commented Jan 16, 2011

After upgrading to YUI 3.3, closing the lightbox no longer works; Chrome reports that Y.get is not a method. For now, I've manually added 'node-deprecated' to the dependencies in my YUI.use call.

This change was made in yui/yui3@43d14a7#diff-17.

@hausidefx
Copy link

Not sure why it's not working for me. This is what I have, any help would be much appreciated:

YUI({
modules : {
'gallery-lightbox' : {
fullpath : 'js/node-deprecated.js',
requires : ['node-deprecated']
}
}).use('gallery-lightbox', function(Y){
Y.Lightbox.init();
});

@carey
Copy link
Author

carey commented May 12, 2011

My code looks like this, with some other unrelated code left out, so you don't need all the dependencies:

YUI().use('event-delegate', 'node-size', 'node-style', 'tabview',
                'gallery-lightbox', 'anim', 'selector-css3', 'node-deprecated', function (Y) {
      Y.on('contentready', function () {
                var imgs = '#gallery > ul > li > a', lightbox;
                lightbox = Y.Lightbox.init({ selector: imgs });
});

I haven't tried updating the module configuration.

You can see it in action (minified) at http://www.bondandbond.co.nz/44303 .

@hausidefx
Copy link

Got it to work. Thanks for the help, carey!

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