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
<!-- Ajouter le script froogaloop à la page --> | |
<script src="//f.vimeocdn.com/js/froogaloop2.min.js"></script> |
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 the_timer; | |
window.addEventListener('resize', function(){ | |
clearTimeout(the_timer); | |
the_timer = setTimeout(function(){ | |
console.log('resized'); | |
}, 75); | |
}); |
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
window.ga_debug = {trace: true}; | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics_debug.js','ga'); | |
ga('create', 'UA-XXXX-Y'); | |
ga('send', 'pageview'); |
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
if(window.ga && ga.create) { | |
// Do you ga stuff | |
ga('send', 'pageview'); | |
} |
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
;(function( window, document, $, undefined ) { | |
'use strict'; | |
var DEMO = DEMO || {}; | |
DEMO.defaultOptions = { | |
newFontSize : '20px', | |
onSetup : null, | |
onAfterAnimation: null | |
}; |
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
// source : https://gist.github.com/necolas/1025811 | |
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(doc, script) { | |
var js, |
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 jqxhr = $.ajax({ | |
beforeSend: function(){ | |
console.log('Before send request'); | |
}, | |
dataType: 'json', | |
url: 'json.json' | |
}) | |
.done(function( data, textStatus, jqXHR ) { | |
var $context = $(document.getElementById('content')), |
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
/** | |
* @fileOverview Gruntfile tasks. These tasks are intended to help you when modifying the template. If you are | |
* just using the template, don't sweat this stuff. To use these tasks, you must install grunt, if you haven't already, | |
* and install the dependencies. All of this requires node.js, of course. | |
* | |
* Install grunt: | |
* | |
* npm install -g grunt-cli | |
* | |
* Then in the directory where you found this file: |
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
for(start value; condition; increment){ | |
//code that will be executed over and over | |
} | |
// iterate 5 times use it for count loop | |
for(var i=0; i < 5; i++){ | |
console.log("The value of i is: " + i + " <br />"); | |
} | |
// increment by 2 instead of 1 | |
for(var i=0; i < array.length; i += 2){ | |
console.log(i + "<br />"); |
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
// Use $.extend() to copy existing functionality | |
var demobox = $('#' + id); | |
demobox.empty(); | |
var forms = {}; | |
forms.enquiry = { | |
email: 'enquiries@domain.com', | |
sendForm: function () { | |
//code which sends email | |
demobox.append('sending email to: ' + this.email + '...' + '<br>'); |