Upon hard refreshing the page in the middle section, there seems to be an issue with the paroller js
transform: translateY();
CSS effect not functioning properly on the
<div class="col col-6" data-paroller-factor="0.4" data-paroller-type="foreground" data-paroller-direction="vertical">
. However, when scrolling afterwards, it works fine. It's important for this to work correctly upon the first hard refresh, as it does with a simple page refresh. The problem arises specifically when doing a hard refresh (Ctrl+F5
) while viewing the middle of the page.
You can find the source URL here:
For a demonstration, visit this URL:
After a hard refresh, incorrect CSS is added without any scrolling (middle of page):
transform: translateY(318px);
However, once you scroll, the correct CSS is applied:
transform: translateY(-16px);
Below is the code snippet for reference:
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<div style="height:400px;"></div>
<div class="row">
<div class="col col-6" data-paroller-factor="0.4" data-paroller-type="foreground" data-paroller-direction="vertical">
<div class="card">
<img class="card-img-top" src="https://lorempixel.com/400/200/abstract/3" alt="Card image cap">
<div class="card-block">
<h4 class="card-title">Card vertical</h4>
<p class="card-text">
<code>data-paroller-factor="0.4" data-paroller-type="foreground"
data-paroller-direction="vertical"</code>
</p>
</div>
</div>
</div>
<div class="col col-6">
<div class="card">
<img class="card-img-top" src="https://lorempixel.com/400/200/abstract/3" alt="Card image cap">
<div class="card-block">
<h4 class="card-title">Card vertical</h4>
<p class="card-text">
<code></code>
</p>
</div>
</div>
</div>
</div>
<div style="height:400px;"></div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://www.jquery-az.com/jquery/js/paroller/jquery.paroller.js"></script>
<script>
$('[data-paroller-factor]').paroller();
$(function () {
$(window).paroller();
});
$( document ).ready(function() {
$('.paroller').paroller({
factor: 0.4,
type: 'foreground'
});
});
</script>
</body>
</html>