| 71 | == Behavior == |
| 72 | |
| 73 | If you want to get really fancy you can use jQuery to create a smooth scrolling effect when the link is clicked. In your site.html template add: |
| 74 | |
| 75 | {{{ |
| 76 | <html xmlns="http://www.w3.org/1999/xhtml" |
| 77 | xmlns:py="http://genshi.edgewall.org/" py:strip=""> |
| 78 | <head py:match="head" py:attrs="select('@*')"> |
| 79 | ${select('*')} |
| 80 | <script type="text/javascript"> |
| 81 | jQuery(document).ready(function($) { |
| 82 | $('a.topofpage').click(function() { |
| 83 | $('html, body').animate({scrollTop:0}, 'slow'); |
| 84 | return false; |
| 85 | }); |
| 86 | }); |
| 87 | </script> |
| 88 | </head> |
| 89 | </html> |
| 90 | }}} |
| 91 | |