Skip to content

Instantly share code, notes, and snippets.

View alvarotrigo's full-sized avatar

Álvaro alvarotrigo

View GitHub Profile
<?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
<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>
@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>
@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;
}
$(document).ready(function() {
$('#fullpage').fullpage({
autoScrolling: false,
fitToSection: false
});
});
@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
});
var data ={};
var self ={};
for(var key in data) {
if(!self.hasOwnProperty(key)) {
self[key] = data[key];
}
}
function User(userData) {
userData = userData || {};
this.name = ko.observable(userData.name);
//copying all non existent properties
for(var key in userData) {
if(!self.hasOwnProperty(key)) {
self[key] = userData[key];
}
@alvarotrigo
alvarotrigo / index.html
Created August 27, 2015 11:30
Offset canvas push menu
<div id="offmenu">
<ul>
<li>aaa</li>
<li>aaa</li>
<li>aaa</li>
<li>aaa</li>
</ul>
</div>
<i id="push" class="fa fa-bars"></i>