PageSourceSearch

https://journals.codesria.org/plugins/generic/ojtPlugin/modules/unify2/js/jQuery.headroom.js?v=3.3.0.22

js codesria.org collected 2026-09-24 09:30:22 UTC 851 bytes, 43 lines download raw bytes

vendor: 851 bytes, lines 1-43
1(function($) {
2
3  if(!$) {
4    return;
5  }
6
7  ////////////
8  // Plugin //
9  ////////////
10
11  $.fn.headroom = function(option) {
12    return this.each(function() {
13      var $this   = $(this),
14        data      = $this.data('headroom'),
15        options   = typeof option === 'object' && option;
16
17      options = $.extend(true, {}, Headroom.options, options);
18
19      if (!data) {
20        data = new Headroom(this, options);
21        data.init();
22        $this.data('headroom', data);
23      }
24      if (typeof option === 'string') {
25        data[option]();
26
27        if(option === 'destroy'){
28          $this.removeData('headroom');
29        }
30      }
31    });
32  };
33
34  //////////////
35  // Data API //
36  //////////////
37
38  $('[data-headroom]').each(function() {
39    var $this = $(this);
40    $this.headroom($this.data());
41  });
42
43}(window.Zepto || window.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.