PageSourceSearch

https://www.ipna.ir/wp-content/themes/Aftab-News11/js/menu.js

js ipna.ir collected 2026-10-02 13:22:03 UTC 3,369 bytes, 106 lines download raw bytes

1/* IPNA_SAFE_OFFSET_FIX */
2(function ($) {
3    if (!$ || !$.fn || !$.fn.offset) {
4        return;
5    }
6
7    var originalOffset = $.fn.offset;
8
9    $.fn.offset = function () {
10        if (!this.length) {
11            return {
12                top: 0,
13                left: 0
14            };
15        }
16
17        return originalOffset.apply(this, arguments);
18    };
19})(jQuery);
20
21	 $(".custom_load *").click(function() {
22        return (false);
23    });
24
25	 $(document).ready(function() {
26                $('.province path').click(function() {
27                    var province = $(this).attr('class');
28                    var provinceName = $(this).attr('data-title');
29                 	$('.province path').attr('data-active','');
30					$(this).attr('data-active','active');
31                });			
32	 
33	 
34	 $("#menu-risponsive").prepend('<span class="fa fa-close" id="menu-close"></span> <h3> منوی سایت </h3>');
35     $tci = 1;
36				$("#lay").click(function() {
37					if($(".null").html()==null){
38						$("#lay").hide();
39                    $(".img").fadeOut("fast");
40                    $(this).fadeOut("fast");
41                    $("#tag").attr("autoplay","");
42				}
43                });
44					
45            $(".main-menu li.menu-item-has-children span.sub-arrow").click(function() {
46                if($(this).text()=="+"){
47                    $(this).addClass("rotatee");
48                    $(this).text("-");
49                }else if($(this).text()=="-"){
50                    $(this).removeClass("rotatee");
51                    $(this).text("+");
52                }
53
54            });
55
56
57            $("	#menu-risponsive li ul").hide();
58     $("#menu-risponsive li.menu-item-has-children").prepend("<span class='arrow-nav-c'><i class='fa fa-angle-down' aria-hidden='true'></i></div>");
59            $("#menu-risponsive li.menu-item-has-children span.arrow-nav-c").click(function() {
60                $(this).next("a").next("ul").slideToggle('fast');
61                if($(this).children("i").hasClass("fa-plus")){
62                    $(this).children("i").removeClass("fa-plus");
63                    $(this).children("i").addClass("fa-minus");
64                }else{
65                    $(this).children("i").addClass("fa-plus");
66                    $(this).children("i").removeClass("fa-minus");
67                }
68            });
69            $("#menu-close").click(function() {
70				$(".bg-null").fadeOut("fast");
71                    $("#menu-risponsive").toggleClass("menu-hidden");
72                });
73				$(".bg-null").click(function() {
74				$(this).fadeOut("fast");
75                    $("#menu-risponsive").toggleClass("menu-hidden");
76                });
77				$(".navbar-c-toggle").click(function() {
78				$(".bg-null").fadeIn("fast");
79                   $("#menu-risponsive").toggleClass("menu-hidden");
80
81                });
82
83
84				$(".res-select-menu").change(function() {
85                    window.location.href=$(this).val();
86                });
87				
88		   });
89
90var xx = $(".main-menu .navbar-c-toggle").offset();
91
92$(window).scroll(function(){
93    if($(this).scrollTop() > xx.top){
94        $(".main-menu .navbar-c-toggle").addClass("fixednav");
95    }else{
96        $(".main-menu .navbar-c-toggle").removeClass("fixednav");
97    }
98
99    if($(this).scrollTop() > 250){
100        $("#back-top").slideDown("fast");
101    }else{
102        $("#back-top").slideUp("fast");
103    }
104
105    
106});

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.