Skip to content

Instantly share code, notes, and snippets.

@thinkphp
Last active December 14, 2015 04:29
Show Gist options
  • Select an option

  • Save thinkphp/5028509 to your computer and use it in GitHub Desktop.

Select an option

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.
;(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