1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- $(window).load(function() {
- stickyFooter();
-
-
- if (!jQuery.support.leadingWhitespace) {
- setInterval(checkForDOMChange, 100);
- }
- });
- function checkForDOMChange() {
-
- if (jQuery.support.leadingWhitespace) {
- $(document).unbind("DOMSubtreeModified");
- }
- stickyFooter();
- }
- if (jQuery.support.leadingWhitespace) {
- $(window).resize(function() {
- stickyFooter();
- });
- }
- function stickyFooter() {
- if ($("footer").attr('style')) {
- $("footer").removeAttr('style');
- }
- if (window.innerHeight != document.body.offsetHeight) {
- var offset = window.innerHeight - document.body.offsetHeight;
- var current = parseInt($("footer").css("margin-top"));
- if (current+offset > parseInt($("footer").css("margin-top"))) {
- $("footer").css({"margin-top":(current+offset)+"px"});
- }
- }
- if (jQuery.support.leadingWhitespace) {
- $(document).bind("DOMSubtreeModified", checkForDOMChange);
- }
- }
|