Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

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.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


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.

Hi,

Now, it's clear. Thank you



Introducing the revolutionary https://www.dumpsmate.com/DAV2-exam.html Free PDF [2023] - your gateway to a seamless, paperless future! Unleash the power of digital documents with our cutting-edge software that's designed to make your life easier. With DAV2, you can effortlessly create, edit, and share PDFs like never before.

What sets DAV2 apart? Our state-of-the-art features, including advanced annotation tools, cloud integration, and lightning-fast rendering, guarantee an unparalleled PDF experience. Say goodbye to tedious paperwork and hello to a greener, more efficient way of working.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(