inherit
222412
0
Jan 29, 2019 16:48:39 GMT -8
tules
76
June 2015
tulululu
|
Post by tules on Apr 19, 2017 14:00:21 GMT -8
supercalifragilistic.boards.net/thread/1/welcome-new-forum?page=1&scrollTo=32I'm using sticky kit to make the mini profiles follow you down the page, but whenever I delete a post on a page, the other posts stop being fixed when I scroll. This resets other jquery elements on the page too, but it's not as big of a deal because they're all some form of tabs and can be reactivated by clicking.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Apr 19, 2017 21:09:31 GMT -8
What "sticky kit" are you referring to? Is it code you got from here? Do you have the link to the code?
|
|
inherit
222412
0
Jan 29, 2019 16:48:39 GMT -8
tules
76
June 2015
tulululu
|
Post by tules on Apr 19, 2017 21:57:04 GMT -8
My bad I forgot to link it. I'm using this sticky kit. This is the script that calls it: $('.sticky').stick_in_parent({ offset_top: 77 });
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Apr 21, 2017 1:19:27 GMT -8
Actions such as deleting a post or changing to a new page in a multipage listing are done through AJAX so a script that executes upon page load may not be aware that content has changed so it can re-execute and process the "new" items (may just be new as in new DOM nodes even though same content with previous modifications discarded so would need to be processed as new).
Essentially you would need to listen for the custom "content has changed" event emitted by Proboards and rerun your script whenever that occurs
pb.events.on('afterSearch', function(){$('.sticky').stick_in_parent({ offset_top: 77 });})
ETA: Keep in mind that only content in the $('.lm-content-'+pb.data('lm_id')) area of the page will have changed so if you are also processing items outside that area you will need to mark them (e.g. add a class) so they can be weaned out of the process on subsequent executions
|
|
inherit
222412
0
Jan 29, 2019 16:48:39 GMT -8
tules
76
June 2015
tulululu
|
Post by tules on May 1, 2017 17:13:59 GMT -8
Thank you so much, Chris!
|
|