This file contains 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
$.ajax({ | |
url: "test.html", | |
dataType: 'xml', | |
success: function (data) { | |
$('#cancelPayment',data).attr('bar','element'); | |
var str = (new XMLSerializer()).serializeToString(data); | |
$('#appDiv').html(str).trigger('create'); | |
} | |
}); |
This file contains 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 vidId = 'videoEmbed'; // the ID of the div holding the video | |
var vidYTId = 'XhLrlhFzAjA'; // the ID of the video from YouTube | |
var YTVideo = new YoutubePlayer(vidId, vidYTId,{ | |
width: 640, | |
height: 360, | |
objparams: { allowFullscreen: "true" }, | |
ytparams: { rel: 0, showsearch: 0, showinfo: 0, modestbranding: 1 } | |
}); |
This file contains 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
// listen for when the viewer decides to start playing the video | |
// hide the intro & outro text divs as well as "lower the lights" | |
YTVideo.on('playing', function() { | |
document.getElementById('intro').setAttribute('class', 'text hide'); | |
document.getElementById('outro').setAttribute('class', 'text hide'); | |
document.getElementById('lights').setAttribute('class', 'darken'); | |
}); | |
// listen for when the video ends | |
// show the outro text div as well as "bring up the lights" |
This file contains 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
// between 13secs and 17secs shoot off a firework every half a second (500ms) | |
YTVideo.at('13000-16500', function() { | |
createFirework(14,73,3,2,null,null,null,20,true,true); | |
}, 500); |
This file contains 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
// don't change these variables | |
var p = false; // currently playing | |
var e = false; // ended | |
var j = true; // first play | |
var videoTimeRaw = 0; | |
var currentTime = 0; | |
var defaultInterval = 100; | |
// configure these variables | |
var vidId = 'videoEmbed'; // the ID of the div holding the video |
This file contains 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
// to start the snowflakes | |
var oncomplete = function() { snowflakes = new Snowflakes('about','snowflakesContainer'); snowflakes.create(40); }; | |
// set-up the breakpoints | |
var mqsugr = new MQSugr(); | |
var breakpoints = { | |
breakpoint1: '320px', | |
breakpoint2: { mq: '600px', tests: 'indexeddb' }, | |
breakpoint3: { mq: '801px', tests: 'cssanimations', yep: ['{cssPath}snowflakes.css', '{jsPath}snowflakes.js'], complete: oncomplete }, | |
breakpoint4: '801px' |
This file contains 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
// this code WON'T be run again with resize or orientationchange | |
// to start the snowflakes | |
var oncomplete = function() { snowflakes = new Snowflakes('container','snowflakesContainer'); snowflakes.create(40); }; | |
// set-up breakpoints | |
Modernizr.load([ | |
{ test: Modernizr.mq('only screen and (min-width: 320px)'), yep: 'css/320.css' }, | |
{ test: Modernizr.mq('only screen and (min-width: 600px)'), yep: 'css/600.css' }, | |
{ test: Modernizr.mq('only screen and (min-width: 600px)') && Modernizr.indexeddb, yep: 'css/600.indexeddb.css' }, |
This file contains 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
<?php | |
require("UAParser.php"); | |
$result = UA::parse(); | |
print $result->full; | |
// -> Chrome 16.0.912/Mac OS X 10.6.8 | |
print $result->browserFull; | |
// -> "Chrome 16.0.912" |
This file contains 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
<?php | |
require("UAParser.php"); | |
$result = UA::get(); | |
?> |
This file contains 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
<?php | |
require("UAParser.php"); | |
$result = UA::parse(); | |
print $result->full; | |
// -> Chrome 16.0.912/Mac OS X 10.6.8 | |
print $result->browserFull; | |
// -> "Chrome 16.0.912" |