PageSourceSearch

https://140suns.ru/templates/sj_veritymag/js/ytsticky.js

js 140suns.ru collected 2026-10-04 17:51:39 UTC 6,152 bytes, 135 lines download raw bytes

1
2jQuery(document).ready(function($){
3
4    //refresh the screen on browser resize?
5
6
7    var YTScript = window.YTScript = window.YTScript || {
8        slidePositions:function(wrap, txt, events){
9            $i = 0;
10
11            $(wrap).find('div.module').each(function(){
12                var $this = $(this);
13                w_btn = $this.find('.btn-special').width();
14                $this.css('top', $i*(w_btn+5)); $i++;
15                $(wrap).find('div.module').removeClass('active');
16                $this.css('width', $this.width());
17                $this.css(txt, - $this.width());
18                $this.find('.btn-special').bind(events, function(){
19                    //if($this.attr('class').contains('active')){
20                    if ( $this.attr('class').indexOf("active") !== -1 ){
21                        // btn
22                        if(txt == 'left')
23                            $this.animate({'left': w_btn }, 200, function(){
24                                $this.show().animate({'left':- $this.width()});
25                            });
26                        else
27                            $this.animate({'right': w_btn }, 200, function(){
28                                $this.show().animate({'right':- $this.width()});
29                            });
30
31                        // Module content
32                        if(txt == 'left')
33                            $(this).animate({'left': - w_btn}, 200, function(){
34                                $(this).show().animate({'left': $this.width()});
35                            });
36                        else
37                            $(this).animate({'right': - w_btn}, 200, function(){
38                                $(this).show().animate({'right': $this.width()});
39                            });
40                        // Class active
41                        $this.removeClass('active');
42                    }else{
43                        // Other modules
44                        $(wrap).find('div.module').each(function(){ //alert(txt);
45                            o_mod = $(this);
46                            (txt == 'left')?o_mod.animate({'left': - o_mod.width()}, 200):o_mod.animate({'right': - o_mod.width()}, 200);
47                            o_mod.removeClass('active');
48                            (txt == 'left')?o_mod.find('.btn-special').animate({'left': o_mod.width()}, 200):o_mod.find('.btn-special').animate({'right': o_mod.width()}, 200);
49                        });
50
51                        // btn
52                        if(txt == 'left')
53                            $(this).animate({'left': $this.width()}, 200, function(){
54                                $(this).show().animate({'left': - w_btn});
55                            });
56                        else
57                            $(this).animate({'right': $this.width()}, 200, function(){
58                                $(this).show().animate({'right': - w_btn});
59                            });
60
61                        // Module content
62                        if(txt == 'left')
63                            $this.animate({'left':- $this.width()}, 200, function(){
64                                $this.show().animate({'left': w_btn});
65                            });
66                        else $this.animate({'right':- $this.width()}, 200, function(){
67                                $this.show().animate({'right': w_btn});
68                            });
69                        // Class active
70                        $this.addClass('active');
71                    }
72                })
73            });
74        },
75        slidePositionNotice:function(wrap, txt, cookiename){
76
77            var $this = $(wrap);
78            h_modcontent = $this.height();
79            
80            $this.prepend("<div class='btn-special'><i class='fa fa-bars'></i></div> <div class='btn-special-close'><i class='fa fa-close'></i></div>" );
81
82            if(txt == 'top'){
83                var $this = $(wrap);
84                $this.css('top', - h_modcontent);
85                $this.children('.btn-special').click(function(){
86                        //$('#yt_wrapper').animate({'padding-top':$this.height()+'px'});
87                        $this.children('.btn-special').animate({bottom:"0",opacity:'0'},function(){
88                            $this.animate({'top':0});
89                        });
90                        $this.addClass('active');
91                        createCookie(TMPL_NAME+'_'+cookiename, 1, 7);
92                });
93
94                $this.children('.btn-special-close').click(function(){
95                    //$('#yt_wrapper').animate({'padding-top':0});
96                    $this.animate({'top':- $this.height()+'px'},function(){
97                        $this.children('.btn-special').animate({bottom:"-80px",opacity:'1'});
98                    });
99                    $this.removeClass('active');
100                    createCookie(TMPL_NAME+'_'+cookiename, 0, 7);
101                });
102            }else {
103                $this.css('bottom', - h_modcontent);
104                $this.children('.btn-special').click(function(){
105                        $('#yt_wrapper').animate({'padding-bottom':$this.height()+'px'});
106                        $this.children('.btn-special').animate({bottom:"0",opacity:'0'},function(){
107                            $this.animate({'bottom':0});
108                        });
109                        $this.addClass('active');
110                        createCookie(TMPL_NAME+'_'+cookiename, 1, 7);
111                });
112
113                $this.children('.btn-special-close').click(function(){
114                    $('#yt_wrapper').animate({'padding-bottom':0});
115                    $this.animate({'bottom':- $this.height()+'px'},function(){
116                        $this.children('.btn-special').animate({bottom:"-130px",opacity:'1'});
117                    });
118                    $this.removeClass('active');
119                    createCookie(TMPL_NAME+'_'+cookiename, 0, 7);
120                });
121
122            }
123
124        }
125
126
127    }
128
129
130
131
132
133});
134
135

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.