Mar 15, 2012

$('#titanic').animate({
	bottom: -1000
}, 10000);

(via @lucassanchez)

Mar 14, 2012

$("#titanic .lifeboat").length/20 < $("#titanic .passenger").length
true
Mar 12, 2012

@keyframes sinkDramatically {
  100% {
    visibility: hidden;
    transform: translate(0, -3800m) rotate(45deg);
  }
}
#titanic {
  animation-name: sinkDramatically;
  animation-duration: 3h ;
  animation-fill-mode: water; /* may be unsupported */
}

(via boldewyn)

Mar 10, 2012

Now with Disqus integration

We just integrated disqus with titanic.js, for your commenting pleasure. :D

Mar 10, 2012

Powered by Sencha Touch ;)

titanic = Ext.get('titanic');
iceberg = Ext.get('iceberg');

if(titanic.getRegion().contains(iceberg.getRegion())){
	store = Ext.getStore('Passengers');
	
	store.each(function(passenger){
		name = passenger.get('name');
		rand = Math.floor(Math.random() * (500000 - 10000 + 1) - 10000);
		live = passenger.get('isFirstClass') ? rand > 1 : rand > 499990;
		if(passenger.get('isBandMember')){
			passenger.play();
			live = false;
		}
		else{
			if(name === 'Rose DeWitt Bukater'){
				live = true;
			}
			else if(name === 'Jack Dawson'){
				live = false;
				rand = 800000;
			}
		}

		if(!live){
			el = Ext.DomQuery(Ext.String.format('passenger[name={0}]', name));
			Ext.Anim.run(el, 'fade', {
				autoClear: false,
				easing: 'ease-out',
				delay: rand,
				passenger: passenger,
				after: function(el, config){ 
					store.remove(config.passenger);
				}
			});
		} 
	}); 
}

(via AndreaCammarata)

Mar 10, 2012

$('#titanic').removeClass('first second /* third */' );

(via andylaub)

Mar 10, 2012

$('#jack').animate({ backgroundColor: "black" }, 1000);

(via pbm)

Mar 10, 2012

iceberg.on('hit', function(titanic) {
    titanic.setTop(0);
});

(via @bt_bruno)

Mar 10, 2012

titanic.style.zIndex = -999999;

(via muuaa)

Mar 10, 2012

var hoto = 'Heart of the Ocean';
var profit = 0; 

if (hoto) {
    profit++;
}

(via downpacket)

Navigate
« To the past Page 1 of 4
About