Widget to template
2 posters
Page 1 of 1
Widget to template
Hi, i am using these arrows on the forum but they are in a widget.
Is there any way to put them in the template?
Is there any way to put them in the template?
- Widget Code:
- Code:
<div style="position:fixed; right:0.1%; bottom:45%;">
<div id="nav_up"><img src="http://i57.servimg.com/u/f57/11/38/18/62/iiii10.gif" alt="Πάνω" title="Πάνω" border="0"></div>
<div id="nav_down"><img src="http://i57.servimg.com/u/f57/11/38/18/62/isiii11.png" alt="Κάτω " title="Κάτω" border="0"></div>
</div>
<script type="text/javascript">
jQuery(function() {
var overelem = jQuery('body');
jQuery('#nav_up').fadeIn('slow');
jQuery('#nav_down').fadeIn('slow');
jQuery('#nav_down').click(
function (e) {
jQuery('html, body').animate({scrollTop: overelem.height()}, 1100);
}
);
jQuery('#nav_up').click(
function (e) {
jQuery('html, body').animate({scrollTop: '0px'}, 1100);
}
);
});
</script>
Re: Widget to template
If you want it to work on almost all pages you would have to add it to nearly every single template. I think you would be best sticking with the widget.
Re: Widget to template
i only want it in the forum.. not in all pages. only in homepage.. can i put it as it is in the template? or it needs any changes..
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Widget to template
Okey dokey,
Administration Panel > Modules > HTML & JAVASCRIPT > Javascript codes management > Create a new script
Name: what you wish
Placement: In the homepage
Administration Panel > Modules > HTML & JAVASCRIPT > Javascript codes management > Create a new script
Name: what you wish
Placement: In the homepage
- Code:
jQuery(function() {
jQuery('body').append('<div style="position:fixed; right:0.1%; bottom:45%;"><div id="nav_up"><img src="http://i57.servimg.com/u/f57/11/38/18/62/iiii10.gif" alt="Πάνω" title="Πάνω" border="0"></div><div id="nav_down"><img src="http://i57.servimg.com/u/f57/11/38/18/62/isiii11.png" alt="Κάτω " title="Κάτω" border="0"></div></div>');
});
jQuery(function() {
var overelem = jQuery('body');
jQuery('#nav_up').fadeIn('slow');
jQuery('#nav_down').fadeIn('slow');
jQuery('#nav_down').click(
function (e) {
jQuery('html, body').animate({scrollTop: overelem.height()}, 1100);
}
);
jQuery('#nav_up').click(
function (e) {
jQuery('html, body').animate({scrollTop: '0px'}, 1100);
}
);
});
Re: Widget to template
I don't know but this works fine to all pages also!!
You are great!! Solved..
You are great!! Solved..
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Similar topics
» Scaling Widget Background Image Based on Widget Size/User Resolution
» How to do this Advanced Hiding Widget Code as well as the Recent Topic's Widget Modification
» Latest Post widget as well as the Latest Topic widget
» Name of template
» + Template why I was not there?
» How to do this Advanced Hiding Widget Code as well as the Recent Topic's Widget Modification
» Latest Post widget as well as the Latest Topic widget
» Name of template
» + Template why I was not there?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum