PageSourceSearch

https://translationjournal.net/templates/rt_osmosis/js/rt-parallax.js

js translationjournal.net collected 2026-10-02 03:21:28 UTC 919 bytes, 31 lines download raw bytes

1;((function(){
2    Element.implement({
3        parallax: function(){
4            var height, self = this,
5                firstTop = this.getPosition().y,
6                pos, top;
7
8            var update = function(){
9                pos = window.getScroll().y;
10                top = self.getPosition().y;
11                height = self.getSize().y;
12                speedFactor = self.get('data-parallax-delta') || 0.7;
13
14                if (top + height < pos || top > pos + window.getSize().y) {
15                    return;
16                }
17
18                self.style.backgroundPosition = "0 " + -(Math.round((firstTop - pos) * speedFactor)) + "px";
19            }
20
21            RokScrollEvents.push(update);
22            update();
23        }
24    });
25
26    window.addEvent('load', function(){
27        document.getElements('.rt-parallax').each(function(element){
28            element.parallax();
29        });
30    });
31})());

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.