Steve
New Member
A member for 8½ years... Exceptional service from Proboards experts 👍
Posts: 81
inherit
205390
0
Jan 6, 2024 5:55:11 GMT -8
Steve
A member for 8½ years... Exceptional service from Proboards experts 👍
81
February 2014
raptor47
|
Post by Steve on Mar 26, 2014 4:37:08 GMT -8
Hi All. I recently added a 'Back to Top' button on our forum. Those using iPad or tablets love the idea as it saves them from scrolling back themselves. I have now been asked if there if I can put a 'Back to bottom' button. I tried modifying the code I had for the original button, and have an image that can go on, but for the life of me I can't get it to work. Is there a simply solution to this ? I've put the piece of code I added for the 'Back to Top' button for you to see here: <a style="position:fixed;bottom:20px;right:12px; "href="#" title="Back to top"><img src="http://i82./j261/torek_2006/aa2_zpsc351c3ce.png"/></a> On the Forum Wrapper, in layout templates, it is on line 72, between: line 71, $[content] & line 73, $[shoutbox] Any help would be appreciated. Best regards, Steve.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Mar 29, 2014 4:27:24 GMT -8
Quite a few ways to do this, but I give you a fancy way... <a id="tobottom" href="#"><img src="http://i82./j261/torek_2006/aa2_zpsc351c3ce.png" alt="To Bottom" title="To Bottom" /></a>
<script>
$(function(){ $("#tobottom img").css({ "-webkit-transform": "rotate(180deg)", "-moz-transform": "rotate(180deg)", "-o-transform": "rotate(180deg)", "-ms-transform": "rotate(180deg)", "transform": "rotate(180deg)" }); $("#tobottom").click(function(e){ e.preventDefault(); $("html, body").animate({ scrollTop: $(document).height() }, 2500); }); });
</script> Just place it where ever you want it to appear. I even use the same image, but rotate it
|
|
Steve
New Member
A member for 8½ years... Exceptional service from Proboards experts 👍
Posts: 81
inherit
205390
0
Jan 6, 2024 5:55:11 GMT -8
Steve
A member for 8½ years... Exceptional service from Proboards experts 👍
81
February 2014
raptor47
|
Post by Steve on Mar 30, 2014 11:22:56 GMT -8
Thanks for the help, but it just sent the page to the top.
|
|