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.