Skip to content

Instantly share code, notes, and snippets.

open HTML file in finder, prevent default gesture behavior:
add -webkit CSS snippet
<style type="text/css">
*
{
-webkit-touch-callout: none;
-webkit-user-select: none;
}
</style>
var ScrollAnimator = function() {
var settings = {},
page,
started = false,
paused = false,
animation = null;
var w = $(window),
d = $(document),
@cacheleocode
cacheleocode / adobe_edge_animate_yepnope.js
Created July 15, 2013 21:54
How to use yepnope in Adobe Edge Animate
// for use in stage action creationComplete
yepnope({
nope:['edge_includes/XXXXXXXX.js'] ,
complete: init
});
function init (){
// code to be executed
}
@cacheleocode
cacheleocode / countdown.html
Created June 27, 2013 19:55
with a check for time zones
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/jquery.countdown.js"></script>
<script type="text/javascript" src="js/jstz-1.0.4.min.js"></script>
switch(tz.name())
{
case "America/Caracas":
// execute code block 1
break;
case 2:
// execute code block 2
break;
@cacheleocode
cacheleocode / detect_online_status.js
Created June 10, 2013 22:30
detect online status
// insert code for mouse click here
if (window.navigator.onLine)
{
sym.$("US_map_symbol").show();
}
else
{
sym.$("US_map_symbol_offline").show();
}
@cacheleocode
cacheleocode / iba_adobe_edge_widget.js
Created May 7, 2013 22:25
snippet to insert into Adobe Edge Animate gesture actions
e.preventDefault();
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>Untitled</title>
<style type="text/css">
*
{
@cacheleocode
cacheleocode / iba_widget_clean.html
Last active December 16, 2015 23:09
Adobe Edge Animate iBooks Author HTML Widget prevent defaults
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>Untitled</title>
<script>
document.addEventListener('touchstart', function (e) {e.preventDefault();}, false);
@cacheleocode
cacheleocode / iba_widget.html
Last active December 16, 2015 23:09
stop the defaults!
<style type="text/css">
* {
-webkit-touch-callout: none;
-webkit-user-select: none;
}
</style>