buttons are hidden by certain layers, even when visible, aren't clickable
-
I figured out the issue; the theme had certain divs set to be higher than the z-index you had the buttons set to. I went in the CSS and modified the z-index to be higher. That solved the problem. See change:
.page-scroll-buttons button, .page-scroll-buttons button:hover, .page-scroll-buttons button:focus { position:fixed; z-index:1000; width:45px; height:45px; background:url('../img/spsb-sprite.png'); border:0; border-radius:4px; margin:0; padding:0; transition:opacity 0.2s linear; text-indent:-99999px; cursor:pointer; }
The key part here is:
z-index:1000;
Another issue I’ve noted is that when I want it to scroll more than 100%, say, 110%, it can’t. It blocks me from doing so via the plugin. It’d be good if you allowed users to decide if they want to do more than 100%.
So I edited:
smooth-page-scroll-updown-buttons/smooth-page-scroll-updown-buttons.phpAnd changed this
if (($page_scroll_buttons_options['psb_distance'] < 1) || ($page_scroll_buttons_options['psb_distance'] > 100)) { // Distance is smaller than 1 or greater than 100 $warnings = true; }
to this:
if ($page_scroll_buttons_options['psb_distance'] < 1) { // Distance is smaller than 1 $warnings = true; }
I also changed the error:
echo '<li><strong>SCROLLING DISTANCE</strong> has to be greater than 1.</li>';
I also modified the head paragraph:
<h2>Smooth Scroll Page Up/Down Buttons Settings</h2> <p>Adding UP/DOWN buttons will enable visitors of your site to scroll smoothly, scrolling one page at a time. Handy for pages with a lot of text/content, or wherever a browser's scrollbar is just not good enough (or not present at all, like on tablets) to go up or down exactly one page/screen.</p><p>Warning: Setting distance to more than 100% may result in unpredictable performance. Only set it more than 100% if you know what you're doing.</p>
I also changed this:
<td> <input type="number" min="1" max="100" id="psb_distance" name="psb_distance" value="<?php echo ( $page_scroll_buttons_options['psb_distance'] ); ?>" style="width:80px;" /> % (<em>100% = full page/screen, 50% = half screen, etc.</em>) </td>
To this:
<td> <input type="number" min="1" id="psb_distance" name="psb_distance" value="<?php echo ( $page_scroll_buttons_options['psb_distance'] ); ?>" style="width:80px;" /> % (<em>100% = full page/screen, 50% = half screen, etc.</em>) </td>
After making those changes, I changed my scrolling distance to 107%. It scrolled from div to div flawlessly. Worked perfectly. My only concern is that I have auto-update enabled, so if you update the plugin, it’ll override my changes. Is there any chance of you including the above changes in the plugin? Of course, it’s your plug in, but it’d be appreciated if you did so.
Thanks for making this plugin!
https://wordpress.org/plugins/smooth-page-scroll-updown-buttons/
- The topic ‘buttons are hidden by certain layers, even when visible, aren't clickable’ is closed to new replies.