Skip to content

Instantly share code, notes, and snippets.

View alvarotrigo's full-sized avatar

Álvaro alvarotrigo

View GitHub Profile
var data ={};
var self ={};
for(var key in data) {
if(!self.hasOwnProperty(key)) {
self[key] = data[key];
}
}
@alvarotrigo
alvarotrigo / requestAnimation.js
Last active August 29, 2015 14:27
requestAnimationFrame IE < 10
window.requestAnimFrame = function(){
return window.requestAnimationFrame || function(callback){ callback() }
}();
//usage
requestAnimFrame(function(){
//do whatever
});
$(document).ready(function() {
$('#fullpage').fullpage({
autoScrolling: false,
fitToSection: false
});
});
@alvarotrigo
alvarotrigo / Reset CSS
Created October 3, 2014 09:49
Reset CSS
/* Reset CSS
* --------------------------------------- */
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,
form,fieldset,input,textarea,p,blockquote,th,td {
padding: 0;
margin: 0;
}
a{
text-decoration:none;
}
@alvarotrigo
alvarotrigo / gist:4a87a4b8757d87df8a72
Last active September 27, 2016 15:25
pagePiling structure
<div id="pagepiling">
<div class="section">Some section</div>
<div class="section">Some section</div>
<div class="section">Some section</div>
<div class="section">Some section</div>
</div>
<div id="multiscroll">
<div class="ms-left">
<div class="ms-section">Section 1 left</div>
<div class="ms-section">Section 2 left</div>
<div class="ms-section">Section 3 left</div>
</div>
<div class="ms-right">
<div class="ms-section">Section 1 right</div>
<div class="ms-section">Section 2 right</div>
<div class="ms-section">Section 3 right</div>
<?xml version="1.0"?>
<!--
IE5 default style sheet, provides a view of any XML document
and provides the following features:
- auto-indenting of the display, expanding of entity references
- click or tab/return to expand/collapse
- color coding of markup
- color coding of recognized namespaces - xml, xmlns, xsl, dt
This style sheet is available in IE5 in a compact form at the URL
<?xml version="1.0"?>
<!--
IE5 default style sheet, provides a view of any XML document
and provides the following features:
- auto-indenting of the display, expanding of entity references
- click or tab/return to expand/collapse
- color coding of markup
- color coding of recognized namespaces - xml, xmlns, xsl, dt
This style sheet is available in IE5 in a compact form at the URL