I found the cause of the problem.
@andreamontanaro see this post,
https://www.gavick.com/forums/quark/par ... tion-44430 specifically dziudek's post near the bottom of the thread.
Apparently this behaviour is intended, a new parallax engine was introduced when the template was updated. You can get back to the old way of doing things by removing the code below from the gk.scripts.js file which you'll find in templates/gk_qurk/js/
- Code: Select all
// New parallax engine
if(jQuery(window).width() > 640) {
jQuery(document).ready(function() {
var parallax_containers = [];
var parallax_heights = [];
var parallax_tops = [];
var window_h = jQuery(window).outerHeight();
var parallax_progress = [];
var parallax_layers = [];
jQuery('.parallax-bg').each(function(i, parallax_wrap) {
parallax_wrap = jQuery(parallax_wrap);
// check the wrapper
if(!parallax_wrap.children('.box-wrap').length) {
parallax_wrap.html('<div class="box-wrap">' + parallax_wrap.html() + '</div>');
}
// don't add position: relative to the tabs content
if(!parallax_wrap.parent().hasClass('gkTabsItem')) {
parallax_wrap.parent().css('position', 'relative');
}
var content = parallax_wrap.children('.box-wrap');
var parallax_layer = jQuery('<div class="parallax-bg-layer"></div>');
parallax_layer.css('background-image', parallax_wrap.css('background-image'));
parallax_wrap.css({
'background-image': '',
'z-index': '1'
});
parallax_layer.css({
'width': '100%',
'height': '130%',
'position': 'absolute',
'z-index': '0',
'top': '0',
'background-size': 'cover'
});
parallax_layer.appendTo(parallax_wrap.parent());
parallax_containers.push(parallax_wrap);
});
jQuery(parallax_containers).each(function(i, container) {
container = jQuery(container);
parallax_heights.push(container.outerHeight());
parallax_tops.push(container.offset().top);
parallax_layers.push(jQuery(container.parent().find('.parallax-bg-layer')));
});
jQuery(window).resize(function() {
jQuery(parallax_containers).each(function(i, container) {
container = jQuery(container);
parallax_heights.push(container.outerHeight());
parallax_tops.push(container.offset().top);
});
});
jQuery(window).scroll(function() {
var scroll = jQuery(document).scrollTop();
jQuery(parallax_tops).each(function(i, top) {
if(
scroll >= top - window_h &&
scroll <= top + parallax_heights[i]
) {
var progress = (scroll - (top + window_h)) / (top + parallax_heights[i]);
jQuery(parallax_layers[i]).css('top', parallax_heights[i] * progress + 'px');
}
});
});
var scroll = jQuery(document).scrollTop();
jQuery(parallax_tops).each(function(i, top) {
if(
scroll >= top - window_h &&
scroll <= top + parallax_heights[i]
) {
var progress = (scroll - (top + window_h)) / (top + parallax_heights[i]);
jQuery(parallax_layers[i]).css('top', parallax_heights[i] * progress + 'px');
}
});
});
}