teste2411199
sexta-feira, 24 de março de 2017
$(function(){
var jElement = $('.element');
$(window).scroll(function(){
if ( $(this).scrollTop() > 2000 ){
jElement.css({
'position':'fixed',
'top':'30px',
'width':'360px'
});
}else{
jElement.css({
'position':'relative',
'top':'30px'
});
}
});
.element {
width: 100%;
margin-top: 30px;
padding: 10px;
background: #f9f9f9;
text-align: center;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
Assinar:
Postagens (Atom)