Moved the image resizing script into footer
authorLaury GvR <laury@gaslightmedia.com>
Tue, 20 Sep 2016 19:19:34 +0000 (15:19 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 20 Sep 2016 19:19:34 +0000 (15:19 -0400)
The script that resizes member-list-images was placed outside of
the HTML tag, in index.php. Now it's place in footer.php.

footer.php
index.php

index c9db146..e74996b 100644 (file)
@@ -143,6 +143,18 @@ __lc.license = 5885401;
     lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.livechatinc.com/tracking.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
 })();
+</script>
+<script>
+    $(document).ready(function () { 
+        $(".glm-member-list-image").each(function() {
+            if( $(this).height() > 175){
+                var height_difference = 175 - $(this).height();
+                height_difference = height_difference / 2;
+                //height_difference = Math.abs(height_difference) * -1;
+                $(this).css("margin-top",  height_difference);
+            }    
+        });
+    });
 </script>
   </body>
 </html>
index 625da63..b7ace6b 100644 (file)
--- a/index.php
+++ b/index.php
                 </div>
             </div>
         </div>
-
-<?php get_footer(); ?>
-<script>
-
-$(document).ready(function () {
-    $(".glm-member-list-image").each(function() {
-        if( $(this).height() > 175){
-            var height_difference = 175 - $(this).height();
-            height_difference = height_difference / 2;
-            //height_difference = Math.abs(height_difference) * -1;
-            $(this).css("margin-top",  height_difference);
-        }
-    });
-});
-</script>
+<?php get_footer(); ?>
\ No newline at end of file