Merge pull request #30 from wpopal/develop

Fix scroll on mobile device
This commit is contained in:
wpopal 2020-01-09 15:19:48 +07:00 committed by GitHub
commit 630a8265bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 1 deletions

View File

@ -220,7 +220,31 @@ jQuery( document ).ready( function ( $ ) {
} );
// sticky ////
$( '.opalestate-sticky-column' ).stick_in_parent();
// $( '.opalestate-sticky-column' ).stick_in_parent();
var window_width = $( window ).width();
if (window_width < 768) {
$(".opalestate-sticky-column").trigger("sticky_kit:detach");
} else {
make_sticky();
}
$( window ).resize(function() {
window_width = $( window ).width();
if (window_width < 768) {
$(".opalestate-sticky-column").trigger("sticky_kit:detach");
} else {
make_sticky();
}
});
function make_sticky() {
$(".opalestate-sticky-column").stick_in_parent();
}
////
$( '.input-group-number' ).each( function () {