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 doClick(e) { | |
alert('Clicked!'); | |
} | |
// Remove the event listener like this: | |
// $.myWidget.off("click", doClick); | |
$.index.open(); |
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
"#wrapper": { | |
// Set wrapper to adjust it's size to it's contents | |
width: Ti.UI.SIZE, | |
height: Ti.UI.SIZE, | |
// Set stuff like borders and backgrounds on the wrapper | |
backgroundColor: "red" | |
} |
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
using terms from application "Mail" | |
on perform mail action with messages theMessages | |
tell application "Mail" | |
repeat with eachMessage in theMessages | |
set theSubject to subject of eachMessage | |
set theMessageId to message id of eachMessage | |
set theRecipientName to name of first to recipient of eachMessage | |
set toDoName to theRecipientName & ": " & theSubject | |
set toDoContent to "[url=message:%3C" & ¬ | |
theMessageId & ¬ |
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
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
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
$('a[href^="#"]').click(function (e) { | |
e.preventDefault(); | |
$('html, body').animate({ | |
scrollTop: $('a[name="'+$(this).attr('href').substr(1)+'"]').offset().top | |
}, 500); | |
}); |
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
var win = Ti.UI.createWindow(); | |
var webView = Ti.UI.createWebView({ | |
url: 'http://www.youtube.com/embed/' + myVideoID + '?autoplay=1&autohide=1&cc_load_policy=0&color=white&controls=0&fs=0&iv_load_policy=3&modestbranding=1&rel=0&showinfo=0', | |
enableZoomControls: false, | |
scalesPageToFit: false, | |
scrollsToTop: false, | |
showScrollbars: false | |
}); |
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
SELECT sql FROM sqlite_master WHERE tbl_name = 'YOUR_TABLE_NAME' AND type = 'table'; |
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 handleOnce(funct) { | |
var flag = false; | |
return function(e) { | |
if (flag) return; | |
flag = true; | |
setTimeout(function() { | |
flag = false; | |
}, 0); | |
funct(e); |
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
/* /Resources/app.js - Generated by Alloy, here to understand the flow */ | |
var Alloy = require("alloy"), _ = Alloy._, Backbone = Alloy.Backbone; | |
Alloy.createController("index"); |
OlderNewer