Pos no sale, a ver si alguien me ayuda encontrando el error.
En mi html tengo:
Código HTML:
Ver original<link rel="stylesheet" type="text/css" href="css/mbfooter.css">
<img src="images/imagen1.jpg" width="1200" height="1855" alt=""/>
<a href="#" id="learn-more-link">Queremos saber más de ti
</a>
<img src="images/imgaen2.jpg" width="480" height="480" alt=""/>
Luego en mi css tengo:
Código CSS:
Ver originalfooter,
header,
section {
display: block;
}
html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
#footer {
width: 100%;
background: #da2027;
z-index: 1000;
color: #ffffff;
padding: 15px 0 100px 0;
position: fixed;
bottom: -540px;
min-height: 472px;
-webkit-transform: translate3d(0,0,0);
-moz-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
-o-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.relative-footer {
position: relative !important;
bottom: 0 !important;
margin-top: -60px;
}
y en java:
Código Javascript
:
Ver originalvar footerCatch = 0;
var footerCaught = false;
var footerActive = false;
$('#learn-more-link').click(function(){
if(!footerCaught && !footerActive){
footerActive = true;
activateFooter();
} else if(footerActive){
footerActive = false;
deactivateFooter();
} else if (footerCaught){
}
return false;
});
// Handle Header and Footer on Scroll
$(window).scroll(function(evnt){
var offset = $(window).scrollTop();
if(footerCatch == 0){
footerCatch = $('body').height() - $(window).height();
}
if(offset >= navCatch){
$('#header').not(".fixed-navigation.header-shadow").addClass('fixed-navigation header-shadow');
}else{
$('#header.fixed-navigation.header-shadow').removeClass('fixed-navigation header-shadow');
}
if($(window).height() < $('body').height() && !shortPage){
if(offset >= (footerCatch - 1) && !footerActive){
!footerCaught && catchFooter();
} else {
footerCaught && releaseFooter();
}
}
// Parallax Scrolling for Hero Image
requestAnimationFrame(function(){
slideItem();
});
});
function activateFooter(){
footerActive = true;
var footerHeight = $('#footer').height() + 62 + 'px';
$(document).bodyHeight();
$('body').css('paddingBottom', footerHeight);
$('#footer').animate({
bottom: 0
}, 200, function(){
});
}
function deactivateFooter(){
footerActive = false;
var footerHeight = -($('#footer').height() + 62) + 'px';
$(document).bodyHeight();
$('body').css('paddingBottom', '0px');
$('#footer').animate({
bottom: footerHeight
}, 200, function(){
});
}
function catchFooter(){
footerCaught = true;
$('#footer').addClass('relative-footer');
}
function releaseFooter(){
footerCaught = false;
$('#footer').removeClass('relative-footer');
}
Muchas gracias por adelantado!