Skip to content

Instantly share code, notes, and snippets.

@faisalahammad
Last active December 9, 2021 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faisalahammad/5625b4cce4a02106975f1e6aa6defa44 to your computer and use it in GitHub Desktop.
Save faisalahammad/5625b4cce4a02106975f1e6aa6defa44 to your computer and use it in GitHub Desktop.
<script text= "text/javascript">
jQuery(function($){
function stickyFooter(){
var footer = jQuery("#et-main-area footer");
var position = footer.position();
var height = jQuery(window).height();
height = height - position.top;
height = height - footer.outerHeight();
if (height > 0) {
footer.css({'margin-top' : height+'px'});
}
}
stickyFooter();
jQuery(window).resize(function(){
stickyFooter();
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment