Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

How to fix non sticking sticky footer with Jquery.


  #1  
Old May 7, 2012, 12:43 PM
lakewooditsupport
 
48 posts · Jun 2011
England, United Kingdom
How to fix non sticking sticky footer with Jquery.

I've had this problem with a few versions of Atahualpa now where the footer stops sticking when selected to stick to the bottom of the screen, I'm not sure what the problem was or what if any plugin is conflicting but it seems to be a common problem. I decided to make a fix and it works perfectly on my site across all up to date browsers.

You can use the jquery script below, in the header or include it in your javascript file if you have one.

Code:
$(function(){
	positionFooter(); 
	function positionFooter(){
		var padding_top = $("#footer").css("padding-top").replace("px", "");
		var page_height = $(document.body).height() - padding_top;
		var window_height = $(window).height();
		var difference = window_height - page_height;
		if (difference < 0) 
			difference = 0;
 
		$("#footer").css({
			padding: difference + "px 0 0 0"
		})
	}
 
	$(window)
		.resize(positionFooter)
});
Its essentially the same as the atahualpa script but this works where the default did.
  #2  
Old May 8, 2012, 03:50 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
doesn't work for me in Safari or firefox on the Mac.

I put it in the ato->Add HTML/CSS Inserts->HTML Inserts: Header and it just displayed the code on the screen. I then surrounded it with '<script type="text/javascript">' and '</script>' and left ato->Style & edit FOOTER->Sticky footer on short pages? set to 'NO' and the footer was not sticky. With it set to 'YES' I get both this code and the atahualpa code and it works fine...but which is working?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old May 8, 2012, 07:02 AM
lakewooditsupport
 
48 posts · Jun 2011
England, United Kingdom
I have no to sticky footer enabled in ATO, but the footer wasn't sticking, it did at first but must have stopped after a changes and plugins were installed.

I have removed the atahualpa javascript for the sticky footer from the js.php file and used the script above in my own javascript file. I then disabled sticky footer in options, its working in all browsers for me on PC & Mac.

It may be conflicting with other JS for you or even the original sticky footer JS. May not work for all but it fixed it for me after months on changing settings and using different methods.

Bookmarks

Tags
sticky footer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sticky Footer in IE8 not working jodybethw Post-Kicker, -Byline & -Footer 2 Mar 28, 2012 12:59 PM
Sticky page footer not sticking Inblingham Post-Kicker, -Byline & -Footer 1 Mar 6, 2011 03:15 AM
Floating above a sticky footer? pjbfcp Atahualpa 3 Wordpress theme 2 Feb 11, 2011 01:56 PM
Sticky Footer krystyna Post-Kicker, -Byline & -Footer 1 Jul 12, 2009 05:21 AM


All times are GMT -6. The time now is 08:33 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.