|
Lines 96-101
$(document).ready(function(){
Link Here
|
| 96 |
})); |
96 |
})); |
| 97 |
|
97 |
|
| 98 |
$("#searchform").on('submit', filter); |
98 |
$("#searchform").on('submit', filter); |
|
|
99 |
$(".filterByLetter").on("click",function(e){ |
| 100 |
e.preventDefault(); |
| 101 |
filterByFirstLetterSurname($(this).text()); |
| 102 |
}); |
| 99 |
}); |
103 |
}); |
| 100 |
|
104 |
|
| 101 |
function filter() { |
105 |
function filter() { |
|
Lines 197-203
function filterByFirstLetterSurname(letter) {
Link Here
|
| 197 |
<div class="browse"> |
201 |
<div class="browse"> |
| 198 |
Browse by last name: |
202 |
Browse by last name: |
| 199 |
[% FOREACH letter IN alphabet.split(' ') %] |
203 |
[% FOREACH letter IN alphabet.split(' ') %] |
| 200 |
<a style="cursor:pointer" onclick="filterByFirstLetterSurname('[% letter %]');">[% letter %]</a> |
204 |
<a href="#" class="filterByLetter">[% letter %]</a> |
| 201 |
[% END %] |
205 |
[% END %] |
| 202 |
</div> |
206 |
</div> |
| 203 |
|
207 |
|