JMan Using jQuery

Posted in JavaScript
2010-05-10 22:35:47 +0000 UTC

As part of my site relaunch, I needed to rewrite a couple of things using jQuery instead of Mootools. One of these things is the Man Page footer at the bottom of the site. Rewriting it using jQuery actually ended up being fairly easy.

I'm not planning on incorporating this into the codebase of JMan, but I figured I'd share it nonetheless. So, here's a simple rewrite of JMan using nothing but jQuery:

		function ManHandler(){
			var pct = Math.round(($(window).height()+$(window).scrollTop())/$(document).height()*100);
			$('#mantext').text(100 > pct ? '--More--('+pct+'%)' : '(END)');
		$('<span id="mantext"></span>').appendTo($(document.body)).css({
			'opacity': 0.8,
		setInterval(ManHandler, 200);