PageSourceSearch

https://www.nestlehealthscience.com.hk/themes/custom/nhsc_com/js/scroll_to.js?tmh1r4

js nestlehealthscience.com.hk collected 2026-10-06 07:59:13 UTC 686 bytes, 30 lines download raw bytes

1/**
2 * @file scroll_to.js
3 */
4(function($, Drupal) {
5
6  'use strict';
7
8  Drupal.behaviors.nhsc_com_scroll_to = {
9    attach: function(context, settings) {
10
11      $('button.hint').click(function() {
12        // By default, offset the height of the parent of the clicked element
13        var offset = $(this).parent().outerHeight();
14
15        // If data-target is set, use that instead
16        var target_selector = $(this).data('target');
17        if (target_selector) {
18          var target = $(target_selector);
19          offset = $(target).offset().top;
20        }
21
22        $('html, body').stop().animate({
23          scrollTop: offset
24        });
25
26      });
27    }
28  };
29
30})(jQuery, Drupal);

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.