Skip to content

Instantly share code, notes, and snippets.

@wolfgangschoeffel
wolfgangschoeffel / horizontalloop-helper-function-for-seamless-looping-responsive-draggable-and-allows-centering.markdown
Created May 14, 2026 10:56
horizontalLoop() helper function for seamless looping (responsive, draggable, and allows centering)

horizontalLoop() helper function for seamless looping (responsive, draggable, and allows centering)

Demonstrates the horizontalLoop() helper function or GSAP, making a group of elements seamlessly loop on the horizontal axis. It's even draggable with momentum-based flicking!

A Pen by GSAP on CodePen.

License.

@wolfgangschoeffel
wolfgangschoeffel / Gruntfile.js
Last active March 13, 2016 14:51
How to use grunt-usemin and grunt-rev when the html file (template) is in a subdirectory but the references should be relative to the root (index.php in the root directory that uses the template).
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to match all subfolders: