Milk
New Member
Posts: 59
inherit
185504
0
Sept 22, 2021 13:14:00 GMT -8
Milk
59
November 2012
wolfmilk
|
Post by Milk on Feb 20, 2015 3:44:48 GMT -8
Hi. I have an element which I want to be position:fixed after a certain point in scrolling. Something like this. However, I want it to fixed be at the bottom of the page not the top. To rephrase this: I want the element to initially not be visible until you scroll down to it. e.g a position:absolute with top:1500px. Once you reach the element, I want it to be fixed at the bottom of the page. e.g. a position:fixed with bottom:0. I'm not good with jquery. Can somebody please help me? Many thanks!
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Feb 20, 2015 9:16:06 GMT -8
Hey Milk, I moved this thread over to the plugin development board since you're working on a JS issue.
|
|
Milk
New Member
Posts: 59
inherit
185504
0
Sept 22, 2021 13:14:00 GMT -8
Milk
59
November 2012
wolfmilk
|
Post by Milk on Feb 20, 2015 16:13:18 GMT -8
Nevermind. I've found a solution.
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Mar 2, 2015 1:10:24 GMT -8
Hi. I have an element which I want to be position:fixed after a certain point in scrolling. Something like this. However, I want it to fixed be at the bottom of the page not the top. To rephrase this: I want the element to initially not be visible until you scroll down to it. e.g a position:absolute with top:1500px. Once you reach the element, I want it to be fixed at the bottom of the page. e.g. a position:fixed with bottom:0. I'm not good with jquery. Can somebody please help me? Many thanks! So what you want to do is make an element, detect when srolling reaches 1500 px and then html <div id="alwaysbottom" style="position:absolute" >BOTTOM</div> where bottom is your content javascript would be setInterval(function(){ if(parseInt($(window).scrollTop())>=1500){$('#alwaysbottom').css({"position":"fixed","bottom":"0"})} },100); This repeatedly looks for scrolling to be 1500 and then fixes it permanently to the bottom
|
|