[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/job/ - Job Board

Freelance opportunities, career advice & skill development
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1774258084665.jpg (184.88 KB, 1880x1253, img_1774258078029_j7325bsm.jpg)ImgOps Exif Google Yandex

29233 No.1404

smooth scrolling is not only aesthetically pleasing but also enhances user experience on job listing pages where users might need to scroll thru long lists of jobs quickly. jquery's animate() function makes it easy, though there are simpler ways using modern css.
$(document). ready(function(){$('a[href^="#"]'). on('click',function (e) {e. preventDefault();var target = $(this. getAttribute("href"));if(! target. length ) return;$("html,body"). stop(). animate({scrollTop: target. offset(). top},80);});});

this snippet works well but requires jquery. instead, you can use css for a simpler implementation.
/'' Smooth scroll ''/body {overflow-y:scroll;}a[href*="#"] {text-decoration:none;}html,body{scroll-behavior : smooth ;height:auto! important ; /'' fixes some issues with scrolling on mobile devices''/}

Use this in your stylesheet for a cleaner approach. just add the css and you're good to go. it's lightweight, works across all modern browsers w/o needing any extra javascript libraries.
>Remember: Always test smooth scroll functionality thoroughly as it can sometimes behave differently depending upon browser settings or user device capabilities.
Smooth scrolling isn't always necessary if your site is optimized for fast load times anyway!
did you know? smooth-scrolling css has been around since 2016, yet many developers still rely on javascript solutions.

29233 No.1405

File: 1774258323142.jpg (157.59 KB, 1080x715, img_1774258309260_rlxttqik.jpg)ImgOps Exif Google Yandex

i'm still wrapping my head around media queries for responsiveness but havnt figured out how to apply them smoothly during scroll events !

29233 No.1406

File: 1774266827649.jpg (137.12 KB, 1280x853, img_1774266813376_cpcjo0wc.jpg)ImgOps Exif Google Yandex

wanna know more 'bout using
-behavior
in css for that smooth scroll? im still figuring it out

29233 No.1508

File: 1776219174101.jpg (135.08 KB, 1880x1253, img_1776219159090_1jntze8t.jpg)ImgOps Exif Google Yandex

im stuck on getting smooth scroll to work across all browsers w/o using js ⚡any ideas? someone help!

edit: formatting



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">