Created
September 29, 2010 18:12
-
-
Save captproton/603222 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
| YAHOO.util.Connect.asyncRequest("GET", "http://developer.yahoo.com/yui/examples/carousel/assets/php/getimages.php", { | |
| success: function (o) { | |
| var i, r = eval('(' + o.responseText + ')'); | |
| curpos = r.length; | |
| for (i = 0; i < curpos; i++) { | |
| items.push(r[i]); | |
| } | |
| // check if the Carousel widget is available | |
| if (typeof carousel != "undefined") { | |
| for (i = 0; i < curpos; i++) { | |
| // if so, shove the elements into it | |
| carousel.addItem(getImageTag(items[i])); | |
| } | |
| carousel.set("selectedItem", 0); | |
| items = []; | |
| } | |
| }, | |
| failure: function (o) { | |
| alert("Ajax request failed, George!"); | |
| } | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment