Fix scroll on mobile device

This commit is contained in:
Hoang Huu 2020-01-09 15:18:56 +07:00
parent 5b835c9fa3
commit bd4f899268

@ -220,7 +220,31 @@ jQuery( document ).ready( function ( $ ) {
} ); } );
// sticky //// // 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 () { $( '.input-group-number' ).each( function () {