Skip to content

Instantly share code, notes, and snippets.

// http://www.komodomedia.com/wp-content/themes/kmv4/scripts/global.js?new
var Sticky = function( $obj, opts ){
$(window).scroll(
function(e){
Sticky.onScroll(e, $obj, opts );
});
}
Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
Ext.regModel('ListItem', {
fields: [{id: 'string', name: 'text'}]
});
Ext.setup({
icon: 'icon.png',
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
glossOnIcon: false,
onReady: function(){
<script type="text/javascript">
var Person = function(){
this.firstName = "Barack";
this.lastName = "Obama";
this.job = "President";
}
</script>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OOJS Test Page</title>
<script type="text/javascript">
function init() {
alert('Do work!');
}
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OOJS Test Page</title>
<script type="text/javascript">
var Person = function(){
this.firstName = "Barack";
this.lastName = "Obama";
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OOJS Test Page</title>
<script type="text/javascript">
var Person = function(){
this.firstName = "Barack";
this.lastName = "Obama";
<script type="text/javascript">
function init() {
var me = new Person();
me.setFirstName('Christopher');
me.setLastName('Webb');
me.setJob('Developer');
me.writePerson(1);
var pooh = me;
pooh.setLastName('Robbin');
<script type="text/javascript">
Person.prototype.setPerson = function(x){
this.firstName = x.firstName;
this.lastName = x.lastName;
this.job = x.job;
}
function init() {
var wife = new Person();
wife.setPerson({
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OOJS Test Page</title>
<script type="text/javascript">
var Person = function(x){
this.firstName = x && x.firstName ? x.firstName : "Barack";
this.lastName = x && x.lastName ? x.lastName : "Obama";