[Snippet] JQuery effect on "Back to Top"

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
Locked
User avatar
FTH
BBCoder III
BBCoder III
Posts: 124
Joined: 25 Nov 2011, 23:28
BBCodes: 10
Contact:

[Snippet] JQuery effect on "Back to Top"

Post by FTH »

Author : FTH
Description : Add a JQuery effect on "back to top"

Open file styles/prosilver/template/overall_header.html

Find :

Code: Select all

<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>
Add after :

Code: Select all

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
Find :

Code: Select all

</head>
Add before :

Code: Select all

<script type="text/javascript">
$(document).ready(function() {
   
    $('a[href=#wrap]').click(function(){
        $('html, body').animate({scrollTop: '0px'}, 800);
        return false;
    });

});
</script>
If you want add a link on index ...

Open file styles/prosilver/template/overall_footer.html

Find :

Code: Select all

<li class="rightside"><!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a> &bull; <!-- ENDIF --><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a> &bull; <!-- ENDIF -->{S_TIMEZONE}</li>
Replace with :

Code: Select all

<li class="rightside"><a href="#wrap" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a> &bull; <!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a> &bull; <!-- ENDIF --><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a> &bull; <!-- ENDIF -->{S_TIMEZONE}</li>
Last edited by FTH on 04 Dec 2011, 00:17, edited 2 times in total.
Flamingdevastation
BBCoder III
BBCoder III
Posts: 76
Joined: 28 Nov 2011, 21:27
BBCodes: 23

[Snippet] JQuery effect on "Back to Top"

Post by Flamingdevastation »

Preview?
User avatar
FTH
BBCoder III
BBCoder III
Posts: 124
Joined: 25 Nov 2011, 23:28
BBCodes: 10
Contact:

[Snippet] JQuery effect on "Back to Top"

Post by FTH »

http://www.graphogames.fr/demo/viewtopic.php?p=44#p44

in the profil click on the icon "back to top" and see now ;)

Edit : first post edited with update
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

[Snippet] JQuery effect on "Back to Top"

Post by martin123456 »

Also works with out the jquery part

Code: Select all

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
Nice snippet ty
User avatar
slash
BBCoder II
BBCoder II
Posts: 57
Joined: 27 Oct 2011, 18:53
BBCodes: 31
Contact:

[Snippet] JQuery effect on "Back to Top"

Post by slash »

very cool effect! thank you so much!
User avatar
RMcGirr83
BBCoder III
BBCoder III
Posts: 104
Joined: 08 Mar 2010, 13:17
Favourite MOD: mChat
Contact:

[Snippet] JQuery effect on "Back to Top"

Post by RMcGirr83 »

Bl4d3 x wrote:Also works with out the jquery part

Code: Select all

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
Not possible as the code in use is jQuery code. It won't work without jQuery being loaded so you must already have some jQuery code within your overall_header.html file...and while I'm at it

Code: Select all

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
To the OP, you should always try and use the latest jQuery code...eg

Code: Select all

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

[Snippet] JQuery effect on "Back to Top"

Post by martin123456 »

Not possible as the code in use is jQuery code. It won't work without jQuery being loaded so you must already have some jQuery code within your overall_header.html file...and while I'm at it
only jquery i use is this

Code: Select all

<script src="{ROOT_PATH}script/jquery-1.7.min.js" type="text/javascript"></script>
We all have mchat or some other mod installed that use's some kind of query so we all have jquery loaded i just pointed out that the jquery posted in the OP post really is not needed.

But i see where your coming from rich.
User avatar
Citromon
BBCoder II
BBCoder II
Posts: 6
Joined: 10 Mar 2012, 15:07
BBCodes: 10

[Snippet] JQuery effect on "Back to Top"

Post by Citromon »

Good afternoon.

Help me please install this snippet.
I did everything according to the instructions - does not work.
Replaced the line as he wrote Sam - does not work.

That's my overall_header.html :
rghost. ru/38797994
matthewtimothy
BBCoder II
BBCoder II
Posts: 31
Joined: 27 Jun 2012, 17:48
BBCodes: 1

[Snippet] JQuery effect on "Back to Top"

Post by matthewtimothy »

Is this the mod for the little arrow on the vorto left. I've looked for that mod for several hours.
User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

[Snippet] JQuery effect on "Back to Top"

Post by Blackwolf »

Citromon wrote:Good afternoon.

Help me please install this snippet.
I did everything according to the instructions - does not work.
Replaced the line as he wrote Sam - does not work.

That's my overall_header.html :
rghost. ru/38797994
Need to post your overall_header between the

Code: Select all

 tags  ;) 

[attachment=0]Oz.png[/attachment]
Attachments
Works fine on Oz forum.
Works fine on Oz forum.
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”
Locked