Coder Social home page Coder Social logo

Sticky Element vanishing 1.0.4 about sticky-kit HOT 7 OPEN

leafo avatar leafo commented on May 18, 2024
Sticky Element vanishing 1.0.4

from sticky-kit.

Comments (7)

leafo avatar leafo commented on May 18, 2024

would it be possible to get an minimal html/css/js reproducing the problem, or at least as page I can look at that has the issue

from sticky-kit.

neotropic2023 avatar neotropic2023 commented on May 18, 2024

Yeah, come monday I will create a little page.
About to leave for the weekend here.

from sticky-kit.

leafo avatar leafo commented on May 18, 2024

No rush, thanks

from sticky-kit.

neotropic2023 avatar neotropic2023 commented on May 18, 2024

Ok, had to come in for a few hours.

http://www.websites4you.com/demo/test/1.0.4/
http://www.websites4you.com/demo/test/no-sticky/

Yeah, does it in this demo to.
So scroll down a bit when the sticky take effect.
Then resize the screen. You will see the non-sticky does not do that at all.

I know many people do not resize their screen much.
But worried it may have that issue on a specific screen size.

Resolved my sidebar jumping off of screen.

CHANGED:
return elm.css({
position: "fixed",
bottom: padding_bottom,
top: "auto"
}).trigger("sticky_kit:bottom");

TO:
return elm.css({
position: "absolute",
bottom: padding_bottom,
top: "auto"
}).trigger("sticky_kit:bottom");

from sticky-kit.

xmojmr avatar xmojmr commented on May 18, 2024

I have hit similar problem. My sticky element went to the bottomed = true state although it should be always sticked to the top. Never to the bottom. The core cause of this problem was that internal recalc() was not called automatically when neighboring elements resized. As a result sticky calculated positions based on incorrect metrics.

Manually running following code resolved my issue (at all places when the visual neighborhood changes due to jQuery show/hide calls):

$(document.body).trigger('sticky_kit:recalc');
$('.fixed-scroll-header').stick_in_parent();

from sticky-kit.

neotropic2023 avatar neotropic2023 commented on May 18, 2024

Interesting I had this same issue on a newer website this week. What I discovered... the downloads minified and non-minified are different versions. I would go with the unminified, none of this would happen. Using the minified version, this would do all of this.

from sticky-kit.

lvne avatar lvne commented on May 18, 2024

Hi sir

https://wisdomhealthwealth.com/articles/entertainment

I have a problem with this i already put this script and its still flashing

$('#sidebar-sticky')
.on('sticky_kit:bottom', function(e) {
$(this).parent().css('position', 'static');
})
.on('sticky_kit:unbottom', function(e) {
$(this).parent().css('position', 'relative');
})

Hope you can help me with this thanks

from sticky-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.