import * as $ from 'jquery';

class StickyFooter {
	body: any;
	container: any;
	footer: any;

	constructor(container: string, footer: string) {
		this.body = $('body');
		this.container = $(container);
		this.footer = $(footer);
	}

	update() {
		this.body.css('marginBottom', this.footer.height());
	}

	init() {
		let self = this;
		$(window).on('load resize', function(){
			self.update();
		});
	}
}

export { StickyFooter }

new StickyFooter('#main', '#footer').init();