Skip to content

Instantly share code, notes, and snippets.

(function() {
function live(selector, context, event, data, handler){
jQuery.each(event.split(/\s+/), function(){
jQuery({length:0, selector:selector, context:context}).live(this.toString(), data, handler);
});
}
function die(selector, context, event, handler){
jQuery.each(event.split(/\s+/), function(){
$(function() {
var photos = $("div.photo");
$('div.slides a').click(function() {
var rel = $(this).attr('rel');
photos.fadeOut(800,function() {
$('#'+rel).fadeIn(800);
});
return false;
});
});