(list)
| 4070 | // and IE can't convert NodeList to an array using [].slice |
| 4071 | // TODO(vojta): use filter if we change it to accept lists as well |
| 4072 | function getFirstAnchor(list) { |
| 4073 | var result = null; |
| 4074 | forEach(list, function(element) { |
| 4075 | if (!result && lowercase(element.nodeName) === 'a') result = element; |
| 4076 | }); |
| 4077 | return result; |
| 4078 | } |
| 4079 | |
| 4080 | function scroll() { |
| 4081 | var hash = $location.hash(), elm; |