Use css for scroll positionning
- Better rendering on scroll on pages with a left block (- It removes the warning on Firefox about scroll positionning)
This commit is contained in:
parent
55b509b3dd
commit
0a21858b33
2 changed files with 7 additions and 10 deletions
|
@ -134,6 +134,13 @@ textarea {
|
|||
padding:0;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.col-content-left {
|
||||
position: sticky;
|
||||
top:50px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-left-top {
|
||||
background:#fff;
|
||||
padding:10px 30px;
|
||||
|
|
|
@ -1,14 +1,4 @@
|
|||
$(document).ready(function() {
|
||||
$(window).scroll(function() {
|
||||
if ($(window).width() >= 768 && $(this).scrollTop() > 72.6) {
|
||||
$('.col-content-left').css({'position':'fixed', 'top':'50px'});
|
||||
$('.col-content-right').addClass('col-sm-offset-4 col-md-offset-3');
|
||||
} else {
|
||||
$('.col-content-left').css({'position':'relative', 'top':'0'});
|
||||
$('.col-content-right').removeClass('col-sm-offset-4 col-md-offset-3');
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof Cookies !== 'undefined') {
|
||||
// Retrieving csrf token
|
||||
csrftoken = Cookies.get('csrftoken');
|
||||
|
|
Loading…
Reference in a new issue