(50 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<script> | <script> | ||
+ | |||
// When the user clicks on <span> (x), close the modal | // When the user clicks on <span> (x), close the modal | ||
Line 8: | Line 9: | ||
var modal = document.getElementById( cl + "Modal" ); | var modal = document.getElementById( cl + "Modal" ); | ||
modal.style.display = "none"; | modal.style.display = "none"; | ||
− | |||
}) | }) | ||
+ | |||
+ | $("div.modal").click( function(){ | ||
+ | this.style.display = "none"; | ||
+ | }); | ||
Line 24: | Line 28: | ||
modalImg.src = this.src; | modalImg.src = this.src; | ||
}) | }) | ||
+ | |||
+ | |||
+ | $(document).ready( function(){ | ||
+ | var whight = $(window).height(); | ||
+ | var dhight = $("#footer").offset().top; | ||
+ | var dimen = $("#footer").height(); | ||
+ | var bre = "<br>" | ||
+ | |||
+ | while (whight > dhight+dimen) { | ||
+ | document.getElementById("foot-comp").innerHTML = bre | ||
+ | var dhight = $("#footer").offset().top; | ||
+ | bre = bre.concat("<br>") | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | $(window).resize( function(){ | ||
+ | var whight = $(window).height(); | ||
+ | var dhight = $("#footer").offset().top; | ||
+ | var dimen = $("#footer").height(); | ||
+ | var bre = document.getElementById("foot-comp").innerHTML | ||
+ | |||
+ | while (whight < dhight+dimen) { | ||
+ | bre = bre.slice(0,-4) | ||
+ | document.getElementById("foot-comp").innerHTML = bre | ||
+ | var dhight = $("#footer").offset().top; | ||
+ | |||
+ | if (bre.length == 0){break} | ||
+ | } | ||
+ | |||
+ | while (whight > dhight+dimen) { | ||
+ | bre = bre.concat("<br>") | ||
+ | document.getElementById("foot-comp").innerHTML = bre | ||
+ | var dhight = $("#footer").offset().top; | ||
+ | } | ||
+ | }); | ||
+ | |||
</script> | </script> | ||
Line 29: | Line 69: | ||
<style type="text/css"> | <style type="text/css"> | ||
footer { | footer { | ||
− | background: # | + | background: #848282; |
color: white; | color: white; | ||
margin: 0px; | margin: 0px; | ||
Line 63: | Line 103: | ||
</style> | </style> | ||
− | <body></body> | + | <body> <div id="foot-comp"> </div> </body> |
<footer id = "footer"> | <footer id = "footer"> | ||
<div class="container"> | <div class="container"> |
Latest revision as of 23:11, 19 October 2016