jSticky icon indicating copy to clipboard operation
jSticky copied to clipboard

Scolling hindered after "sticky" takes effect.

Open demogoria opened this issue 12 years ago • 6 comments

This is along the same lines as the other issue I noticed on here. However, I am only using ONE sticky item (for now). I notice that when in chrome, after I hit the sticky item, the scroll lag is noticeably bad. I attempted to add the $(".sticky:not(.set)").sticky().addClass('set'); code, however, it didn't make a difference.

To maybe aid the quest, I do only notice it when my browser is at full size. I am at 1920x1080 resolution on a 24" monitor. If I resize the browser to a smaller window, it goes away. This makes me assume it is rather resource heavy?

I attempted on different types of items as well (small unfilled divs and whatnot), and all had the same effect. :(

I LOVE the multi-sticky usage and LOVE the offset abilities as well. :) Thanks for a great script!

demogoria avatar Dec 27 '12 13:12 demogoria

OK. Perhaps there is a performance bug in there that warrants investigation. Are you able to provide a link to the site as well as a link to the js source that calls jSticky?

AndrewHenderson avatar Dec 28 '12 01:12 AndrewHenderson

Hey there Andrew! Thanks for the quick reply! The site it is on now is under development at http://199.167.42.90/teetimes/ with login info of admin/admin. You can see that both the dates on the <TH> of the table, as well as the right sidebar contact yellow box are sticky. (If you browse around the site, the yellow contact box is on there as well, and has the same problem.)

My JS is being run through the minify compressor though so it probably wont do you any good. hehe. Sorry.

I did just test in IE as well, and have noticed a "drag" there as well. Let me know if you need anything else. Thank you again!

demogoria avatar Dec 28 '12 01:12 demogoria

I'm finding the lag to be slight. Almost unnoticeable. However, it's probably worth throttling the scroll position check. Right now it fires every move. I wrote it this way so that it would stop on the exact point rather than snap back should you blow by the start/stop point with a quick scroll. I also want to create an empty sticky placeholder rather than a clone which will increase performance.

On Thu, Dec 27, 2012 at 5:40 PM, demogoria [email protected] wrote:

Hey there Andrew! Thanks for the quick reply! The site it is on now is under development at http://199.167.42.90/teetimes/ with login info of admin/admin. You can see that both the dates on the of the table, as well as the right sidebar contact yellow box are sticky. (If you browse around the site, the yellow contact box is on there as well, and has the same problem.)

My JS is being run through the minify compressor though so it probably wont do you any good. hehe. Sorry.

I did just test in IE as well, and have noticed a "drag" there as well. Let me know if you need anything else. Thank you again!

— Reply to this email directly or view it on GitHubhttps://github.com/AndrewHenderson/jSticky/issues/2#issuecomment-11723174.

Andrew Henderson Portfolio http://andrewhenderson.me/portfolio/ | LinkedInhttp://www.linkedin.com/in/andrewmhenderson| Facebook http://facebook.com/andrew.m.henderson | Twitterhttp://twitter.com/AndrewHenderson | Blog http://andrewhenderson.me

AndrewHenderson avatar Dec 28 '12 01:12 AndrewHenderson

Yes, the lag is slight on my computer. I did test a "healthy dinosaur" as I call it, at my work, and it was definitely much more noticeable. I wish I had more of a grasp of the jquery language to shed some more light on the issue or even lend a hand. I am one for UNDERSTANDING code, but never to write it myself. :)

demogoria avatar Dec 28 '12 01:12 demogoria

It's cool. I will make those improvements and commit to GitHub and you can let me know if it helps.

On Thu, Dec 27, 2012 at 5:57 PM, demogoria [email protected] wrote:

Yes, the lag is slight on my computer. I did test a "healthy dinosaur" as I call it, at my work, and it was definitely much more noticeable. I wish I had more of a grasp of the jquery language to shed some more light on the issue or even lend a hand. I am one for UNDERSTANDING code, but never to write it myself. :)

— Reply to this email directly or view it on GitHubhttps://github.com/AndrewHenderson/jSticky/issues/2#issuecomment-11723356.

Andrew Henderson Portfolio http://andrewhenderson.me/portfolio/ | LinkedInhttp://www.linkedin.com/in/andrewmhenderson| Facebook http://facebook.com/andrew.m.henderson | Twitterhttp://twitter.com/AndrewHenderson | Blog http://andrewhenderson.me

AndrewHenderson avatar Dec 28 '12 02:12 AndrewHenderson

Just tried adding a debounce function and it doesn't work with the stopping tops and bottoms as it scrolls past and then jumps back to position

mikestreety avatar Jul 15 '16 14:07 mikestreety