Timeline for Change JS/jQuery Scroll function based on screensize
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 25, 2023 at 8:43 | vote | accept | Dtorr1981 | ||
Feb 28, 2023 at 19:30 | answer | added | Zollie | timeline score: 2 | |
Feb 28, 2023 at 17:06 | comment | added | Zollie | @Dtorr1981 - ohh, yes, I start to understand the issue more clearly now. | |
Feb 28, 2023 at 16:54 | comment | added | Dtorr1981 | @Zollie Thanks Zollie, unfortunately, that is not it. On Desktops I need the scroll to go right to the very top of the page so the menu can be seen. This is more apparent if you click on the ate 1428 - You'll see the scroll doesn't go all the way to the top. On mobiles, this is fine as the timeline-info box actually moves underneath the image/date links, so we need the scroll to stay the same on mobiles (i.e. col-md-12/col-sm-12/col-xs-12). So small screens the function works as intended. For larger screens when the timeline-info is col-lg-6 I need to scroll to the top of the fpage | |
Feb 28, 2023 at 16:40 | comment | added | Zollie |
@Dtorr1981 - it looks like that the div is not scrolling to the top fully because the div id="service-1" class="timeline-info" has margin-top: 30px; in css rules. You should just delete or comment out that rule as I see it. (I hope I did not misunderstand your issue...)
|
|
Feb 28, 2023 at 13:09 | comment | added | Dtorr1981 | @mickmackusa The scroll function works fine, I just need to adjust it so it scrolls to the top of page on desktops. Currently it just scrolls the top of the #timeline-info div. This is fine on mobiles as the div expands under the image/year list. Is there away to add a media type query to change this on desktop by detecting the screensize then scrolling to the top if it is col-lg-6. | |
Feb 28, 2023 at 0:12 | history | asked | Dtorr1981 | CC BY-SA 4.0 |