If you're experiencing difficulties, it may be necessary to turn off scrollify while your lightbox is active.
You can find more information on this topic on the scrollify website.
Specifically, you will need to use the following:
$.scrollify.disable();
and
$.scrollify.enable();
Update
In the version currently in use (I'm not aware of any other versions, as I haven't used the library before), there seems to be a bug with the disable() method:
$.scrollify.disable = function() {
disable = true;
};
The variable disable
is not defined. To fix this, you should update this variable name to disabled
. (Please check for any script updates before making this change manually.)
To achieve the desired outcome, you'll need to make some adjustments. Let's take the "READ JOB DESCRIPTION" button as an example. You have the following code for showing and hiding the lightbox:
// SERVICES 2 - OVERLAY - SHOW
$( "#srvcs2" ).click(function() {
$( "#services2-overlay" ).removeClass('animated fadeOutDown').css('left', '0').addClass('animated fadeInUp');
$( "#services2-overlay .container" ).css('opacity', '0').addClass('animated fadeInUp');
});
// SERVICES 2 - OVERLAY - HIDE
$( "#services2-overlay-close" ).click(function() {
$( "#services2-overlay" ).removeClass('animated fadeInUp').addClass('animated fadeOutDown');
$( "#services2-overlay .container" ).removeClass('animated fadeInUp');
});
You will need to insert the scrollify enable and disable code within these functions (and in all other event handlers), like so:
// SERVICES 2 - OVERLAY - SHOW
$( "#srvcs2" ).click(function() {
$.scrollify.disable();
$( "#services2-overlay" ).removeClass('animated fadeOutDown').css('left', '0').addClass('animated fadeInUp');
$( "#services2-overlay .container" ).css('opacity', '0').addClass('animated fadeInUp');
});
// SERVICES 2 - OVERLAY - HIDE
$( "#services2-overlay-close" ).click(function() {
$.scrollify.enable();
$( "#services2-overlay" ).removeClass('animated fadeInUp').addClass('animated fadeOutDown');
$( "#services2-overlay .container" ).removeClass('animated fadeInUp');
});
Note the inclusion of $.scrollify.disable();
and $.scrollify.enable();
This will deactivate scrollify when the lightbox is open and reactivate it once the lightbox is closed.