vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - Create "Back to top" button using jQuery in one step. (https://vborg.vbsupport.ru/showthread.php?t=286106)

xixxon 08-02-2012 12:47 PM

Quote:

Originally Posted by BlueCheri (Post 2353636)
Great, works fine

G!

5 stars if u like it :p

Kraxell 08-02-2012 03:08 PM

Its the same like this:
https://vborg.vbsupport.ru/showthread.php?t=243771

zascok 08-02-2012 05:09 PM

Quote:

Originally Posted by sub_ubi (Post 2353216)
Awesome mod we love it.

Just one problem with VB CMS on our home page its interfering with our slider vFCoders - Featured Content Slider Widget (was not able to change images/articles.

Is there an easy way to exclude/disable it from a page or url?

I don't really know what is the CMS variable as I have no suit. But if you can find it or hopefully someone will tell us just put it instead of calendar in the following

Code:

<vb:if condition="THIS_SCRIPT != 'calendar'">
The rest of the code for footer goes here
</vb:if>


sub_ubi 08-02-2012 10:00 PM

Its vbcms

zascok 08-04-2012 12:40 PM

Quote:

Originally Posted by sub_ubi (Post 2353832)
Its vbcms

Then copy and paste this


Code:

<vb:if condition="THIS_SCRIPT != 'vbcms'">
<style type='text/css'>
#bttop{border:1px solid #4adcff;background:#24bde2;text-align:center;padding:5px;position:fixed;bottom:35px;right:10px;cursor:pointer;display:none;color:#fff;font-size:11px;font-weight:900;}
#bttop:hover{border:1px solid #ffa789;background:#ff6734;}
</style>
<div id='bttop'>BACK TO TOP</div>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'></script>
<script type='text/javascript'>$(function(){$(window).scroll(function(){if($(this).scrollTop()!=0){$('#bttop').fadeIn();}else{$('#bttop').fadeOut();}});$('#bttop').click(function(){$('body,html').animate({scrollTop:0},800);});});</script>
</vb:if>


xixxon 08-04-2012 01:57 PM

Quote:

Originally Posted by zascok (Post 2354352)
Then copy and paste this


Code:

<vb:if condition="THIS_SCRIPT != 'vbcms'">
<style type='text/css'>
#bttop{border:1px solid #4adcff;background:#24bde2;text-align:center;padding:5px;position:fixed;bottom:35px;right:10px;cursor:pointer;display:none;color:#fff;font-size:11px;font-weight:900;}
#bttop:hover{border:1px solid #ffa789;background:#ff6734;}
</style>
<div id='bttop'>BACK TO TOP</div>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'></script>
<script type='text/javascript'>$(function(){$(window).scroll(function(){if($(this).scrollTop()!=0){$('#bttop').fadeIn();}else{$('#bttop').fadeOut();}});$('#bttop').click(function(){$('body,html').animate({scrollTop:0},800);});});</script>
</vb:if>


Thanks for supporting :up: :D

zascok 08-04-2012 04:01 PM

Quote:

Originally Posted by xixxon (Post 2354378)
Thanks for supporting :up: :D

you are welcome. My turn to ask for a help. There is a small but annoying issue with the button.

When one opens the page at first the button is there, how to make it dissapear and appear only if one scrolled down a little. The very first time.

You see I gotta stop doing this. I mean asking then thinking lol

$('#bttop').hide()

CrossWind 08-05-2012 12:37 AM

hi

Please tell me how to make it work with VB3

thanks

xixxon 08-05-2012 01:25 AM

Quote:

Originally Posted by zascok (Post 2354424)
you are welcome. My turn to ask for a help. There is a small but annoying issue with the button.

When one opens the page at first the button is there, how to make it dissapear and appear only if one scrolled down a little. The very first time.

You see I gotta stop doing this. I mean asking then thinking lol

$('#bttop').hide()

I will do it in the next update :D

Quote:

Originally Posted by CrossWind (Post 2354542)
hi

Please tell me how to make it work with VB3

thanks

I don't use vBB3, so I can't test this :(
So sorry, anyone help him plz :o

Arrogant-One 08-08-2012 09:17 PM

Quote:

Originally Posted by CrossWind (Post 2353094)
Thanks a nice idea
Code works fine with VB4

But does not work with VB3
Please tell me how to make it work with VB3

with my best regards

Would be better it if was more instantaneous. All it seems to do is scroll up to the top, not get you there ASAP!


All times are GMT. The time now is 07:19 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01052 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete