Support Forum

  • Page:
  • 1

JB Library - Scroll to top button

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi Guys,

Running this on Avanti 1.0.3, K2 V2.2, J1.5.15
Can you advise how to shift the position?
I use Wibiya toolbar which covers the Scroll to top button.
Site link is: K2Joom

Thanks in advance.

Simon
  • K2Joom's Avatar
  • K2Joom
  • 12 Month basic
  • 136 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
Hey Simon,

You can adjust the position in the css.

Find the file
plugins/system/plg_jbLibrary.php

and locate the following code
if($scrollStyle == "dark")
		{
			$document->addStyleDeclaration("#toTop {width:100px;z-index: 10;border: 1px solid #333; background:#121212; text-align:center; padding:5px; position:fixed; bottom:0px; right:0px; cursor:pointer; display:none; color:#fff;text-transform: lowercase; font-size: 0.9em;}");
		}
		if($scrollStyle == "light")
		{
			$document->addStyleDeclaration("#toTop {width:100px;z-index: 10;border: 1px solid #eee; background:#f7f7f7; text-align:center; padding:5px; position:fixed; bottom:0px; right:0px; cursor:pointer; display:none;  color:#333;text-transform: lowercase; font-size: 0.9em;}");
		}
	}

Now in there you have for the dark and the light style,
position:fixed; bottom:0px; right:0px;

If you alter the bottom and right values, you can change the position of the button.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Thanks Jason,

Simple when you know where to look.
All sorted and now visible.

Thanks

Simon
  • K2Joom's Avatar
  • K2Joom
  • 12 Month basic
  • 136 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
Glad you got it sorted :)
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Just thought I'd bung a penneth worth in here, even though it's an old thread; might be useful to others...

Rather than editing the original php file, I've added to my Joomla template.css, as follows:

#toTop {
width:100px;
z-index: 10;
border: 1px solid #333;
-moz-border-radius-topleft: 8px;
-webkit-border-top-left-radius: 8px;
background:#121212;
text-align:center;
padding:5px;
position:fixed;
bottom:126px;
right:0px;
cursor:pointer;
display:none;
color:#fff;
text-transform: lowercase;
font-size: 0.7em;
}

Seems to make it a bit easier to play with, and doesn't risk breaking the original setup. The only downside is the styling gets applied to both 'light' and 'dark', whichever is chosen. But as I only want one style throughout, it's not a problem for me.

Hope this might be of use to others trying to find out how to style their button.

Frank
  • FranksBank's Avatar
  • FranksBank
  • JB Pro
  • 8 posts
  • Karma: 0
The administrator has disabled public write access.
Thanks Frank - yep thats what we have been doing in our own themes since this thread was written.

Cheers Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers