Disabling sticky in mobile size (responsive)
I am using KTSticky on card item in a sidebar. It works well in desktop version. It stands sticky even in mobile version. How can I manage it. I want to disable sticky in smaller size of screen.
Replies (4)
Deleted comment
Hi,
Could you please edit src/js/components/sticky.js in line 79:
if ( offset === false ) {
_disable();
return;
} And use
data-kt-sticky-offset="{default: false, lg: '50px'}" attribute to disable it for mobile ? We will include this fix in the next update.Then recompile your assets folder with Gulp or Webpack.
Please note that the build tools are required only in the development environment just to compile the assets when the source folder files are modified. In the hosting/server deployment, you will only need the compile assets, no need to install the build tools dependencies there.
Regards,
Sean
Hi,
Worked with data-kt-sticky-offset="{default: false, lg: '50px'}" without changing js file. Is it ok?
Hi,
Yes, its OK, in actual desktop and mobile devices it would work.
The js fix I provided would make it for browser to resize from desktop to mobile size and vise versa.
if you need any further help, please do let us know.
Regards.
Your Support Matters!
We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.