Skip to content

Instantly share code, notes, and snippets.

View miguel-perez's full-sized avatar

Miguel Pérez miguel-perez

View GitHub Profile
@miguel-perez
miguel-perez / Isometric-game-grid.markdown
Created July 3, 2014 03:05
A Pen by Miguel Ángel Pérez.
@miguel-perez
miguel-perez / about.html
Last active August 29, 2015 14:04 — forked from deenath/about.html
#4: Help Sample
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>About - Document</title>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery.smoothState.js"></script>
<script src="js/scripts.js"></script>
</head>
<body>
@miguel-perez
miguel-perez / README.md
Last active August 29, 2015 14:04
Barebones implementation of jQuery.smoothState.js

By default, jQuery.smoothState.js will:

  • Prevent links from triggering a full page load
  • Update the user's URLs and history as to not break browsing expectations
  • Use Ajax to request and cache on the user's device
@miguel-perez
miguel-perez / README.md
Last active August 29, 2015 14:04
An example of page transitions with jQuery.smoothState.js
@miguel-perez
miguel-perez / disqus.js
Created August 5, 2014 13:27
Disqus and smoothState.js
// DISQUS
var MP = MP || {};
MP.comments = {
init: function(){
"use strict";
var disqus_shortname = 'miguelperez';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
@miguel-perez
miguel-perez / initSmoothState.js
Created August 5, 2014 15:57
New smoothState signature
// Contents of functions.js
;(function($) {
'use strict';
var $body = $('html, body'),
content = $('#main').smoothState({
// Runs when a link has been activated
onStart: function(url, $container) {
// toggleAnimationClass() is a public method
// for restarting css animations with a class
content.toggleAnimationClass('is-exiting');
@miguel-perez
miguel-perez / test.js
Created August 6, 2014 21:50
StackOverflow
var
/**
* Fires a custom event when all animations are complete
* @param {object} $element - jQuery object that should trigger event
*
*/
triggerAllAnimationEndEvent = function ($element) {
var animationCount = 0,
animationstart = "animationstart webkitAnimationStart oanimationstart MSAnimationStart",
<p>Hello world</p>
@miguel-perez
miguel-perez / footer.html
Last active October 9, 2015 14:12
LWF New Header / Footer