PageSourceSearch

https://fosi.org/wp-content/themes/fosi/js/script.js

js fosi.org collected 2026-09-24 07:30:54 UTC 2,428 bytes, 70 lines download raw bytes

1jQuery(document).ready(function ($) {
2  $("<span class='clickD'></span>").insertAfter(
3    ".navbar-nav li.menu-item-has-children > a"
4  ),
5    $(".navbar-nav li .clickD").click(function (e) {
6      e.preventDefault();
7      var $this = $(this);
8      $this.next().hasClass("show")
9        ? ($this.next().removeClass("show"), $this.removeClass("toggled"))
10        : ($this.parent().parent().find(".sub-menu").removeClass("show"),
11          $this.parent().parent().find(".toggled").removeClass("toggled"),
12          $this.next().toggleClass("show"),
13          $this.toggleClass("toggled"));
14    }),
15    $(window).on("resize", function () {
16      $(this).width() < 1025 &&
17        ($("html").click(function () {
18          $(".navbar-nav li .clickD").removeClass("toggled"),
19            $(".toggled").removeClass("toggled"),
20            $(".sub-menu").removeClass("show");
21        }),
22        $(document).click(function () {
23          $(".navbar-nav li .clickD").removeClass("toggled"),
24            $(".toggled").removeClass("toggled"),
25            $(".sub-menu").removeClass("show");
26        }),
27        $(".navbar-nav").click(function (e) {
28          e.stopPropagation();
29        }));
30    }),
31
32    $(".navbar-toggler").click(function () {
33      $(".navbar-toggler").toggleClass("open"),
34        $(".navbar-toggler .stick").toggleClass("open"),
35        $("body,html").toggleClass("open-nav");
36    }),
37    $('.nav-item.dropdown').append('<button class="toggle_drop"><i class="fa-solid fa-chevron-down"></i></button>');
38    $('.toggle_drop').click(function(){
39      $(this).parents('.nav-item.dropdown').toggleClass('toggle_open');
40      $(this).parent().find('.dropdown-menu').toggle();
41    })
42    $(".form_dg_wrapper input[type=search]").on("focus", function () {
43      $(this).parents(".search_box").addClass("search_active");
44    });
45	/*$(".form_dg_wrapper input[type=search]").on("blur", function () {
46    if ($(this).val() === "") {
47      $(this).parents(".search_box").removeClass("search_active");
48    }
49	});
50	*/
51	
52	// Back to top js code
53	var amountScrolled = 300;
54	$(window).scroll(function() {
55
56		if ( $(window).scrollTop() > amountScrolled ) {
57			$('a.yydev-back-to-top').fadeIn('slow');
58		} else {
59			$('a.yydev-back-to-top').fadeOut('slow');
60		} 
61
62	}); 
63    // adding smooth scrolling to button
64	$('a.yydev-back-to-top').click(function() {
65		$('html, body').animate({ scrollTop: 0 }, 700);
66		return false;
67	});
68
69});
70

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.