Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!---- Add Code to Divi - Integration - Add Code to <head> ---->
- <script text= "text/javascript">
- jQuery(function($){
- function stickyFooter(){
- var footer = $("#main-footer");
- var position = footer.position();
- var height = $(window).height();
- height = height - position.top;
- height = height - footer.outerHeight();
- if (height > 0) {
- footer.css({'margin-top' : height+'px'});
- }
- }
- stickyFooter();
- $(window).resize(function(){
- stickyFooter();
- });
- });
- </script>
- <!---- OLD CODE - Add Code to Divi - Integrations - Add Code to Body ---->
- <script>// <![CDATA[
- function stickyFoot(){
- var th = jQuery('#top-header').height(); var hh = jQuery('#main-header').height(); var fh = jQuery('#main-footer').height(); var wh = jQuery(window).height(); var ch = wh - (th + hh + fh); jQuery('#main-content').css('min-height', ch);
- }
- stickyFoot();
- jQuery(window).on("resize",stickyFoot);
- // ]]></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement