Skip to content

Instantly share code, notes, and snippets.

View goldsky's full-sized avatar

rico goldsky

View GitHub Profile
@goldsky
goldsky / autoload.fancybox.js
Created April 13, 2012 04:45
This snippet loads fancybox automatically to all images inside the #content area. Useful for user's images that are uploaded by TinyMCE.
$(document).ready(function() {
$("#content img").wrap(function() {
return '<a href="'+ this.src +'" />';
}).parent().fancybox();
});
@goldsky
goldsky / body.html
Created February 5, 2012 09:21
torben's sticky footer
<body lang="en" class="sticky-frame">
<header id="header" class="sticky-row">
<div class="center">
<h1>Some Header</h1>
</div>
</header>
<div id="wrap" class="sticky-row sticky-expand">
<div id="content-wrapper">
<article id="content">
<p>Some content</p>
@goldsky
goldsky / jquery.stoc.js
Created January 28, 2012 12:16
jQuery Plugin: Table of Contents with Smooth Scrolling
/**
* jQuery Plugin: Table of Contents with Smooth Scrolling
* @link http://www.1stwebdesigner.com/css/jquery-plugin-smooth-scrolling/
* @author Rochester Oliveira
*/
(function($){
$.fn.stoc = function(options) {
//Our default options
var defaults = {