Welcome, Guest

JB Library - Scroll to top button
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: JB Library - Scroll to top button

JB Library - Scroll to top button 2 years, 3 months ago #20379

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
  • ( Moderator )
  • OFFLINE
  • 12 Month basic
  • Posts: 130
  • Karma: 0

Re:JB Library - Scroll to top button 2 years, 3 months ago #20382

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
  • ( Admin )
  • OFFLINE
  • 12 Month Developer
  • Posts: 2947
  • Karma: 75

Re:JB Library - Scroll to top button 2 years, 2 months ago #20542

Thanks Jason,

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

Thanks

Simon
  • K2Joom
  • ( Moderator )
  • OFFLINE
  • 12 Month basic
  • Posts: 130
  • Karma: 0

Re:JB Library - Scroll to top button 2 years, 2 months ago #20564

Glad you got it sorted
  • Anthony Olsen
  • ( Admin )
  • NOW ONLINE
  • Moderator
  • Posts: 17254
  • Karma: 317
Creative Unique Minimal Joomla Templates

Re: JB Library - Scroll to top button 7 months, 3 weeks ago #54065

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
  • ( User )
  • OFFLINE
  • Fresh Bamboo
  • Posts: 8
  • Karma: 0

Re: JB Library - Scroll to top button 7 months, 3 weeks ago #54074

Thanks Frank - yep thats what we have been doing in our own themes since this thread was written.

Cheers Anthony
  • Anthony Olsen
  • ( Admin )
  • NOW ONLINE
  • Moderator
  • Posts: 17254
  • Karma: 317
Creative Unique Minimal Joomla Templates
  • Page:
  • 1
Time to create page: 1.03 seconds