Last active
December 14, 2015 04:29
-
-
Save thinkphp/5028509 to your computer and use it in GitHub Desktop.
Example of using CUI Library passed as argument: dom object, event object and yql function.
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
| ;(function(dom, event, yql) { | |
| var $ = function( id ){ return dom.select(id);}; | |
| cui.ready(function(){ | |
| var input = $("#in"), | |
| output = $("#out"); | |
| input.html(arr.join(", ")) | |
| $('#action').Click(function( event ){ | |
| output.html((sorting.insert( arr )).join(", ")) | |
| }) | |
| var user = 'thinkphp'; | |
| var query = 'select * from rss where url="http://ws.audioscrobbler.com/1.0/user/'+ user +'/recenttracks.rss"'; | |
| yql(query, function( data ){ | |
| console.log( data ) | |
| }) | |
| }) | |
| })(cui.dom, cui.event, cui.yql); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment