iaian7 » code » webcode   John Einselen, 18.07.07 (updated 10.04.11)    

AN7effects is a collection of simple MooTools scripts for adding link effects and content toggles to a website.

linkFade, contentFade, and contentSlide

read more

CSS Lightbox Overlay

iaian7 » code » webcode   John Einselen, 20.06.18 (updated 3.07.20)    

Designed as a more modern and much lighter-weight alternative to the antiquated mediaboxAdvanced. While this relies exclusively on simple HTML and CSS for layout and animation, it does require Javascript to allow for automated play and pause when opening or closing video layers, and override default :target behaviour to set states. This stops the browser history from filling up with endless anchor links, but if javascript is disabled, the :target behaviour still works as expected and videos can be manually played or paused as desired (they just won’t stop playing automatically when the layer is closed).

image 1image 2image 3Vimeo video image 1 image 2 image 3

YouTube and Vimeo API scripts are loaded in the header, while the iframes include onload actions to initialise the APIs, and the anchor elements include onclick actions for setting status. This system includes none of the media titles or content detection of mediaboxAdvanced, and there are some limitations to this mostly-CSS approach, but in general it’s pretty usable. Check out the CodePen.io page for more details and the source code.

1CSS lightbox overlay source

You can also check out a demo using next/previous buttons to navigate through groups of overlays. This would require a bit more development to make it useful (especially developing the CMS integration to make it automatic), but is a starting point for further investigation.

1CSS lightbox overlay navigation

CSS Looping Fader

iaian7 » code » webcode   John Einselen, 20.05.18 (updated 20.10.18)    

This is based on an example by Jonathan Snook, but has been updated to fade seamlessly between images without cross fading (which reveals the background). This is achieved by animating the z-index while simultaneously delaying the fade out of each layer until the replacing layer is fully visible.

While the animation timeline does depend on a set number of images, it would be possible to set up classes for each variation needed (for example, 4, 5, and 6 image rotations). (fade duration + visible duration) * number of images = total duration which can be used to set up the percentages for the animation timeline. More details can be found in the Jonathan Snook article linked above.

This version uses CSS backgrounds (defined in the HTML by an assumed CMS) instead of <img> tags to provide a more seamless and responsive (depending on your CSS setup) end result. Loading images as backgrounds also prevents them from being selected by accident.

1CSS fader source code



iaian7 » code » webcode   John Einselen, 27.09.08 (updated 6.12.19)    

This script has been replaced by mediaboxAdvanced.

read more


iaian7 » code » webcode   John Einselen, 28.09.09 (updated 6.12.19)    


Based on Lightbox, Slimbox, and the Mootools javascript library, mediaboxAdvanced is a modal overlay that can handle images, videos, animations, social video sites, twitter media links, inline elements, and external pages with ease.

This script is no longer being developed, but remains online for reference.

read more


iaian7 » code » webcode   John Einselen, 17.02.09 (updated 10.04.11)    

Parallax is a small javascript based on the Mootools library that allows you to set up 2.5D interaction with basic DIVs and CSS styling. Anywhere from scrollable landscapes to lens flare effects can be achieved, with reasonably easy setup and simple depth controls.

read more