PageSourceSearch

https://studienwahl.de/_assets/87f9c96bba272ae9927080fd0c3f0ed7/JavaScript/backToTop.js?1778060430

js studienwahl.de collected 2026-10-02 04:07:49 UTC 1,380 bytes, 52 lines download raw bytes

1$(document).ready(function () {
2  const language = $("html").attr("lang");
3
4  const srOnlyLabels = {
5    de: "Zurück nach oben",
6    en: "Back to top"
7    // fr: "Retour en haut",
8    // it: "Torna su",
9    // es: "Volver arriba",
10    // pt: "Voltar ao topo",
11    // nl: "Terug naar boven",
12    // pl: "Wróć na górę",
13    // cs: "Zpět nahoru",
14    // hu: "Vissza a tetejére",
15    // ro: "Înapoi sus",
16    // tr: "Yukarı dön",
17    // bg: "Върни се нагоре",
18    // ru: "Наверх",
19    // zh: "回到顶部",
20    // ja: "トップに戻る",
21    // ko: "맨 위로 돌아가기"
22  };
23
24  //Create Button via JS
25  var back_to_top_button = [`<button class="back-to-top"><span class="sr-only">${srOnlyLabels[language]}</span><i class="icon text-secondary fa-solid fa-square-caret-up"></i></button>`].join("");
26  $("body").append(back_to_top_button);
27
28  // Der Button wird ausgeblendet
29  $(".back-to-top").hide();
30
31  // Method with scrolling behavior
32  $(function () {
33    $(window).scroll(function () {
34      if ($(this).scrollTop() > 100) {
35        // If 100px has been scrolled
36        $(".back-to-top").fadeIn();
37      } else {
38        $(".back-to-top").fadeOut();
39      }
40    });
41
42    $(".back-to-top").click(function () {
43      $("body,html").animate(
44        {
45          scrollTop: 0
46        },
47        250
48      );
49      return false;
50    });
51  });
52});

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.