Line 16: | Line 16: | ||
<script src="https://github.com/kswedberg/jquery-smooth-scroll/blob/master/jquery.smooth-scroll.min.js"></script> | <script src="https://github.com/kswedberg/jquery-smooth-scroll/blob/master/jquery.smooth-scroll.min.js"></script> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<style> | <style> | ||
Line 171: | Line 148: | ||
</div> | </div> | ||
</div> | </div> | ||
+ | |||
+ | <script> | ||
+ | $('.smooth').on('click', function() { | ||
+ | $.smoothScroll({ | ||
+ | scrollElement: $('body'), | ||
+ | scrollTarget: '#' + this.id | ||
+ | }); | ||
+ | |||
+ | return false; | ||
+ | }); | ||
+ | |||
+ | function w3_close() { | ||
+ | document.getElementById("mySidebar").style.display = "none"; | ||
+ | document.getElementById("myOverlay").style.display = "none"; | ||
+ | } | ||
+ | |||
+ | // Modal Image Gallery | ||
+ | function onClick(element) { | ||
+ | document.getElementById("img01").src = element.src; | ||
+ | document.getElementById("modal01").style.display = "block"; | ||
+ | var captionText = document.getElementById("caption"); | ||
+ | captionText.innerHTML = element.alt; | ||
+ | } | ||
+ | |||
+ | </script> | ||
+ | |||
+ | </body> | ||
+ | </html> |
Revision as of 18:42, 12 September 2017