index.php
7.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<script>
$(document).ready(function() {
$(window).load(function() {
bottom = $('#bigSlider').position().top;
//alert(currentScroll + " - " + bottom);
currentScroll = $(window).scrollTop(); // get current position
if (currentScroll > bottom) { // apply position: fixed if you
$('.bigSlidertabs').addClass('fixed');
$('.bigSlidertabs').css({ // scroll to that element or below it
position: 'fixed'
});
} else { // apply position: static
$('.bigSlidertabs').removeClass('fixed');
$('.bigSlidertabs').css({ // if you scroll above it
position: 'absolute'
});
}
});
$(window).scroll(function() { // assign scroll event listener
bottom = $('#bigSlider').position().top;
//alert(currentScroll + " - " + bottom);
currentScroll = $(window).scrollTop(); // get current position
if (currentScroll > bottom) { // apply position: fixed if you
$('.bigSlidertabs').addClass('fixed');
$('.bigSlidertabs').css({ // scroll to that element or below it
position: 'fixed'
});
} else { // apply position: static
$('.bigSlidertabs').removeClass('fixed');
$('.bigSlidertabs').css({ // if you scroll above it
position: 'absolute'
});
}
});
prev_img_url = $('#bigSlider #myCarousel').find('.item').last().find('img').attr('src');
next_img_url = $('#bigSlider #myCarousel').find('.item').next().find('img').attr('src');
$('#bigSlider #myCarousel').find('.img-nav.img-prev').attr('src',prev_img_url);
$('#bigSlider #myCarousel').find('.img-nav.img-next').attr('src',next_img_url);
$('#bigSlider #myCarousel').bind('slide.bs.carousel', function (e) {
prev_img_url = $(this).find('.item.active').prev().find('img').attr('src');
if(prev_img_url == undefined){
prev_img_url = $('#bigSlider #myCarousel').find('.item').last().find('img').attr('src');
}
next_img_url = $(this).find('.item.active').next().find('img').attr('src');
if(next_img_url == undefined){
next_img_url = $('#bigSlider #myCarousel').find('.item').first().find('img').attr('src');
}
$(this).find('.img-nav.img-prev').attr('src',prev_img_url);
$(this).find('.img-nav.img-next').attr('src',next_img_url);
});
});
</script>
<!---- SLIDER FOR Main page ------->
<div id="bigSlider">
<div id="myCarousel" class="carousel slide carousel-fade">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
<li data-target="#myCarousel" data-slide-to="4"></li>
<li data-target="#myCarousel" data-slide-to="5"></li>
</ol>
<!-- Картинки в карусельке -->
<div class="carousel-inner">
<div class="active item">
<a href="http://www.linija-svitla.ua/aktsiya.htm" title="При покупке светильника лампочка в подарок.*"> <img alt="При покупке светильника лампочка в подарок.*" src="http://www.linija-svitla.ua/res/custom/images/slider/lAMP FREE.jpg" />
</a>
</div>
<div class="item">
<a href="/detskie-15.htm" title="myKidsRoom"> <img alt="myKidsRoom" src="http://www.linija-svitla.ua/res/custom/images/slider/kids5w.jpg" />
</a>
</div>
<div class="item">
<a href="/sales.htm" title="Распродажа коллекций прошлых годов"> <img alt="Распродажа коллекций прошлых годов" src="http://www.linija-svitla.ua/res/custom/images/slider/Razprodaza.jpg" />
</a>
</div>
<div class="item">
<a href="http://www.linija-svitla.ua/light-topps-lt290209-8671.htm" title="iDual"> <img alt="iDual" src="http://www.linija-svitla.ua/res/custom/images/slider/iDual.jpg" />
</a>
</div>
<div class="item">
<img alt=" " src="http://www.linija-svitla.ua/res/custom/images/slider/3.jpg" />
</div>
<div class="item">
<a href="/catalogues.htm" title="Модели"> <img alt="Модели" src="http://www.linija-svitla.ua/res/custom/images/slider/2.jpg" />
</a>
</div>
</div>
<!-- Навигационные элементы -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">
<span class="carousel-control-nav left"></span>
<img class="img-nav img-prev" src="http://www.linija-svitla.ua/res/custom/images/slider/lAMP FREE.jpg" />
</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">
<span class="carousel-control-nav right"></span>
<img class="img-nav img-next" src="http://www.linija-svitla.ua/res/custom/images/slider/kids5w.jpg" />
</a>
</div>
<!-- Табы для слайдера -->
<div class="bigSlidertabs" >
<div class="block-100">
<div class="tab1">
<a href="actionlist.htm">
<div class="tab_bg_1"></div>
<p>В данный момент у нас проходит <a href="actionlist.htm">25 акций</p></a>
</a>
</div>
<div class="tab3">
<a href="sales.htm">
<div class="tab_bg_3"></div>
<p>Вы можете значительно сэкономить при покупке. Посмотреть <a>все РАСПРОДАЖИ</a></p>
</a>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="block-100 margin-top-20 margin-bottom-40">
<div class="container">
<div class="slider_mp_items">
<div class="catalog_product_list view_table">
<?= \common\modules\product\widgets\specialProducts::widget(['type' => 'top'])?>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>