Skip to content

Instantly share code, notes, and snippets.

@yanguango
Created December 23, 2010 11:36
Show Gist options
  • Save yanguango/752862 to your computer and use it in GitHub Desktop.
Save yanguango/752862 to your computer and use it in GitHub Desktop.
//news.js
var webView = Ti.UI.createWebView({
top:0,
left:0,
backgroundColor:"#fff",
width:320,
url:'news.html'
});
Ti.App.addEventListener('fillNews', function(passedData)
{
contentView.evalJS("$('#title').text('"+win.newsTitle+"');");
});
//news.html
<script>
$(document).ready(function(){
Ti.App.fireEvent('fillNews');
});
//we use jquey
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment