Skip to content

Instantly share code, notes, and snippets.

View flxa's full-sized avatar

Nicholas Fletcher flxa

View GitHub Profile
@jyek
jyek / ghost-next-prev-post
Last active November 8, 2021 09:38
Ghost Blog - Next Prev Posts
/*
* Ghost Blog: Next & Previous Posts Workaround
*/
// Step 1: Insert at end of default.hbs. Requires jQuery.
$(function(){
var NextPrevLinksModule = function(){
var curr,
$prevLink,
$nextLink;
@james2doyle
james2doyle / scrollTo.js
Last active October 25, 2024 14:12
a native scrollTo function in javascript that uses requestAnimationFrame and easing for animation
// easing functions http://goo.gl/5HLl8
Math.easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) {
return c/2*t*t + b
}
t--;
return -c/2 * (t*(t-2) - 1) + b;
};
@mstepanov
mstepanov / app.js
Created March 19, 2013 23:19
Titanium ListView Examples
var rootWin = Ti.UI.createWindow();
var navGroup = Ti.UI.iPhone.createNavigationGroup({
window: rootWin
});
var button = Ti.UI.createButton({
title: 'Open ListView Tests'
});
button.addEventListener('click', function() {
openTestsWindow();
});