This commit is contained in:
2023-08-08 17:04:21 +00:00
parent 31ecda89b2
commit ec382e989a
147 changed files with 18206 additions and 18063 deletions

View File

@@ -1,42 +1,42 @@
<?php
include_once "include/constantes.php";
?>
<a href="#top" id="scroll-up" class="btn btn-primary btn-sm" role="button" aria-pressed="true" style="display: none; position: fixed; bottom: 3rem; right: 1rem;">
<?= $ICO['arriba'] ?>
</a>
<!-- Scroll down -->
<a href="#bottom" id="scroll-down" class="btn btn-primary btn-sm" role="button" aria-pressed="true" style="display: none; position: fixed; bottom: 1rem; right: 1rem;">
<?= $ICO['abajo'] ?>
</a>
<script>
$(document).ready(function() {
$(window).scroll(function() {
if ($(this).scrollTop() > 100) {
$('#scroll-up').fadeIn();
} else {
$('#scroll-up').fadeOut();
}
if ($(this).scrollTop() < $(document).height() - $(window).height() - 100) {
$('#scroll-down').fadeIn();
} else {
$('#scroll-down').fadeOut();
}
});
$('#scroll-up').click(function() {
$("html, body").animate({
scrollTop: 0
}, 600);
return false;
});
$('#scroll-down').click(function() {
$("html, body").animate({
scrollTop: $(document).height()
}, 600);
return false;
});
});
<?php
include_once "include/constantes.php";
?>
<a href="#top" id="scroll-up" class="btn btn-primary btn-sm" role="button" aria-pressed="true" style="display: none; position: fixed; bottom: 3rem; right: 1rem;">
<?= $ICO['arriba'] ?>
</a>
<!-- Scroll down -->
<a href="#bottom" id="scroll-down" class="btn btn-primary btn-sm" role="button" aria-pressed="true" style="display: none; position: fixed; bottom: 1rem; right: 1rem;">
<?= $ICO['abajo'] ?>
</a>
<script>
$(document).ready(function() {
$(window).scroll(function() {
if ($(this).scrollTop() > 100) {
$('#scroll-up').fadeIn();
} else {
$('#scroll-up').fadeOut();
}
if ($(this).scrollTop() < $(document).height() - $(window).height() - 100) {
$('#scroll-down').fadeIn();
} else {
$('#scroll-down').fadeOut();
}
});
$('#scroll-up').click(function() {
$("html, body").animate({
scrollTop: 0
}, 600);
return false;
});
$('#scroll-down').click(function() {
$("html, body").animate({
scrollTop: $(document).height()
}, 600);
return false;
});
});
</script>