PageSourceSearch

https://barrebody.com.au/wp-content/themes/barrebody/assets/js/lib…?ver=9faf48692d589a350aaadf45731b01f8

js barrebody.com.au collected 2026-09-24 12:25:58 UTC 2,403 bytes, 75 lines download raw bytes

1"use strict";
2
3/*!
4 * jQuery inView plugin
5 * 
6 * Copyright Mirko Renzetti
7 */
8(function ($) {
9  $.fn.inview = function (options) {
10    var defaults = {
11      'viewFactor': 0.3,
12      'onEnter': function onEnter($object) {},
13      'onLeave': function onLeave($object) {}
14    };
15    var custom = $.extend(defaults, options);
16    var blockList = [];
17    this.each(function () {
18      var $block = $(this);
19      var block = {};
20      block.top = $block.offset().top;
21      block.height = $block.innerHeight();
22      block.bottom = block.top + block.height;
23      block.obj = $block;
24      block.inView = null;
25      blockList.push(block);
26    });
27    var globaList = $(window).data('inView.globaList') || [];
28    globaList.push({
29      'options': custom,
30      'blockList': blockList
31    });
32    $(window).data('inView.globaList', globaList);
33
34    function changeWindow() {
35      var documentTop = $(window).scrollTop();
36      var documentBottom = documentTop + $(window).innerHeight();
37      var globaList = $(window).data('inView.globaList');
38
39      for (var j = 0; j < globaList.length; j++) {
40        var options = globaList[j].options;
41        var blockList = globaList[j].blockList;
42
43        for (var i = 0; i < blockList.length; i++) {
44          var block = blockList[i];
45          var top = Math.max(documentTop, block.top);
46          var bottom = Math.min(documentBottom, block.bottom);
47          var height = bottom - top;
48
49          if (block.inView !== true && height / block.height >= options.viewFactor) {
50            blockList[i].inView = true;
51            block.obj.addClass(block.obj.data('class-in'));
52            block.obj.removeClass(block.obj.data('class-out'));
53            if (typeof options.onEnter === 'function') options.onEnter(block.obj);
54          } else if (block.inView !== false && height <= 0) {
55            blockList[i].inView = false;
56            block.obj.addClass(block.obj.data('class-out'));
57            block.obj.removeClass(block.obj.data('class-in'));
58            if (typeof options.onLeave === 'function') options.onLeave(block.obj);
59          }
60        }
61      }
62    }
63
64    if (!$(window).data('inView.initialized')) {
65      $(window).data('inView.initialized', true);
66      $(window).on({
67        'scroll': changeWindow,
68        'resize': changeWindow
69      });
70    }
71
72    $(window).trigger('resize');
73  };
74})(jQuery);
75//# sourceMappingURL=jquery.inview.js.map

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.