/    Sign up×
Community /Pin to ProfileBookmark

Scrolling Text Area

I’m having trouble implementing a text area scroller: “button_scroller.html” shows the original code working as it should – when you get to the bottom of the list the scrolling automatically stops.

“scroll_text.html” is my working version. Click on a menu item to see its corresponding list. This one will keep scrolling indefinitely – why? Also, I’ve been trying to implement a necessary addition: when you click on a menu item the scrolling text area should return to the top of the text area, but adding –

[code]document.getElementById(id).style.scrollTop = 0;[/code]

to the javascript isn’t working. How should this be implemented? Thanks for any help.

[upl-file uuid=35c461dc-2550-4844-bbc6-3c0f8a9ad626 size=8kB]scroll_text.zip[/upl-file]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Pherank spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...