Can you control scrollbars in code? Plugins or otherwise?
-
I have a WordPress site, with Learndash built in, to sell courses.
A lesson looks like the following: https://www.screencast.com/t/9ywLOA3clm
On the right side is a scroll bar, and it’s organized in code like this, so it will just work in the browser, and not get activate on the mobile phone.
Inside a given lesson (which is like a post), I set the “Extra class name” to in_scroll_class so it has access to this code:
@media only screen and (min-width: 768px) {
.wpb_text_column.wpb_content_element.in_scroll_class
{ height: 320px; overflow: auto; } }Here is the solution I am looking for.
In the screenshot above, you will see that the lesson is called “Love Is Happening Now. Repeat.”
On the right I want the scroll bar to always scroll so that the lesson is in view (preferably in the middle, but it might be imperfect, and that is okay).
The scroll bar always scrolls to the top, so the user can scroll down and will see the lesson in bold type, but it would be much more intuitive if the correct lesson was always visible.
When a page refreshes, I have viewed the html and I know that it would have the text “Love Is Happening Now. Repeat.” – so it could be looked for specifically.
Then the scroll bar would be scroll so that text is in view.
I am open to a plugin being easier to work with than this scenario, and I am open to a different way of doing this.
However the widget on the right is built in to Learndash, and I don’t want to reinvent that.
I would appreciate any response to point me in the right direction, and/or sample code that has accomplished this, maybe on a site.
Can anybody help ?
-
Is your site hosted here on WordPress.com, or is it a self-hosted WordPress (WordPress.org) site?
Additionally, please share your site link.
-
self-hosted
http://www.UnderstandEachOther.com
you can log in with (email visible only to moderators and staff)
with a password of [redacted by mod]
Then click one of the courses, such as the first one… then click a lesson… and you will be in the loop
-
oops… I’m not allowed to let somebody log in…
let me know if I should type that differently, and also you would need this link:
Except it won’t work unless you log in
-
Please do not share your username, email ID and password in these forums. These forums are public and are visible to all.
I am not very sure of a solution, and I am afraid we are unable to help you here too. These forums are only for questions related to WordPress.com sites.
You can post the question on self-hosted WordPress (WordPress.org) forums for help: https://wordpress.org/support/
-
Hi derekmhart160118,
understandeachother.com is a WordPress.org site hosted by GoDaddy, rather than WordPress.com. The key differences between the two are explained here:
We are only able to help with WordPress.com sites on these forums. However, I see @strikebuys has already given you a link to the <a href=”
https://wordpress.org/support/”>WordPress.org support forums — you can post there for help with your site.Best of luck getting this sorted!
- The topic ‘Can you control scrollbars in code? Plugins or otherwise?’ is closed to new replies.