Created
June 10, 2009 00:32
-
-
Save rainhead/126929 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From http://developer.yahoo.com/yui/3/examples/overlay/overlay-io-plugin.html | |
YUI3.use('overlay', 'io', function(Y) { | |
function Lightbox(config) { | |
arguments.callee.superclass.constructor.call(this, config); | |
}; | |
Lightbox.NAME = "lightbox"; | |
Lightbox.NS = "lightbox"; | |
Y.extend(Lightbox, Y.Overlay, { | |
syncUI: function() { | |
var cfg = {on: {}}; | |
cfg.on.success = Y.bind(this._ioSuccess, this); | |
cfg.method = "GET"; | |
console.log("Making request!"); | |
Y.io(this.get("uri"), cfg); | |
}, | |
_ioSuccess: function(id, o) { | |
console.log("Got content!"); | |
this.set('bodyContent', o.responseText); | |
} | |
}); | |
window.Lightbox = Lightbox; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment