PageSourceSearch

https://polintermed.ru/bitrix/templates/polintermed/js/jquery.anchorScroll.js

js polintermed.ru collected 2026-09-28 15:03:09 UTC 1,102 bytes, 32 lines download raw bytes

1(function($){
2    $.fn.anchorScroll = function(offset){
3            return this.each(function(){
4                    $(this).click(function() {
5                        var regExp = /#.+/g;
6                        var aMatch;
7
8                        aMatch = regExp.exec($(this).attr("href"));
9
10                        if(!aMatch)
11                            return true;
12
13                        var elementToScroll = $(aMatch[0]);
14                        var scrollVal =  elementToScroll.offset().top - offset + "px";
15                        var curScroll = $(window).scrollTop();
16
17                        if(curScroll != scrollVal)
18                        {
19                            $("html, body").animate({
20                                    scrollTop: scrollVal
21                                }, {
22                                    duration: 500,
23                                    easing: "swing"
24                                });
25                        }
26
27                        return false;
28                    });
29            }
30    )};
31})
32(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.