bzr branch
http://gegoxaren.bato24.eu/bzr/lenasys/trunk
52.1.1
by b11johgu
Added controllers for examplepage, templatelayout. |
1 |
/* Functions */
|
2 |
$(document).ready(function(){ |
|
3 |
||
4 |
|
|
5 |
/* When menu item is clicked, scroll down to target with -64px offset. |
|
6 |
* Target is decided according to h1[name='xxx'] instead of id.
|
|
7 |
*/
|
|
8 |
$('#navigation li.menuLink').click(function(e) { |
|
9 |
e.preventDefault(); |
|
10 |
$this =$(this); |
|
64.1.1
by b11johgu
ExamplesController: |
11 |
var target = ($this.data('name') + ', h1[name="' + $this.data('name') + '"]'); |
52.1.1
by b11johgu
Added controllers for examplepage, templatelayout. |
12 |
$target = $(target); |
13 |
$('html, body').stop().animate({ |
|
14 |
'scrollTop': $target.offset().top -64 |
|
15 |
}, 400, 'swing'); |
|
16 |
}); |
|
17 |
});
|