(list)
| 2956 | // and IE can't convert NodeList to an array using [].slice |
| 2957 | // TODO(vojta): use filter if we change it to accept lists as well |
| 2958 | function getFirstAnchor(list) { |
| 2959 | var result = null; |
| 2960 | forEach(list, function(element) { |
| 2961 | if (!result && lowercase(element.nodeName) === 'a') result = element; |
| 2962 | }); |
| 2963 | return result; |
| 2964 | } |
| 2965 | |
| 2966 | function scroll() { |
| 2967 | var hash = $location.hash(), elm; |