<form role="form" id="form" action="catalog/vse-tovaryi/" data-def="catalog/vse-tovaryi/">
<select name="ms|price">
<option value="">Любая</option>
<option value="500">500 рублей</option>
</select>
<select name="msoption|tags">
<option value="1">Тэг 1</option>
<option value="2">Тэг 2</option>
</select>
<button type="submit">Подобрать</button>
</form>
window.onload = function () {
var form = $('#form'), def = form.data('def'), data = {}, action;
$(document).on('change', '#form select', function () {
var el = $(this), val = el.val(), name = el.attr('name');
if (val) {
data[name] = val;
} else {
delete data[name];
}
action = def + "?";
for(var i in data) {
action += i + "=" + data[i] + '&';
}
action = action.substr(0, action.length - 1);
form.attr('action', action);
});
};
<div class="wrapper">
<section class="page page--one">
</section>
<section class="page page--two">
</section>
<section class="page page--free">
</section>
</div>
body, html {
width: 100%;
height: 100%;
}
body {
overflow: hidden;
}
.wrapper {
width: 100%;
height: 100%;
[class*=page--] {
position: absolute;
left: 0;
height: 100%;
width: 100%;
transform: translateY(100%);
transition: transform 2s;
&:first-child {
position: relative;
transform: translateY(0);
}
&.active {
transform: translateY(-100%);
}
}
.page--one {
background-color: red;
}
.page--two {
background-color: green;
}
.page--free {
background-color: blue;
}
}
(function (w, d) {
var blocks = d.querySelectorAll('.page'),
ln = blocks.length,
index = 0,
stop = false,
direction,
next,
curr;
$(window).on("mousewheel DOMMouseScroll", function(event) {
event.preventDefault();
var evt = event.originalEvent ? event.originalEvent : event;
if (!stop) {
stop = true;
direction = evt.detail ? evt.detail*(-40) : evt.wheelDelta;
if (direction < 0) {
index + 1 < ln ? index++ : "";
next = blocks[index];
next ? next.classList.add('active') : "";
} else {
curr = blocks[index];
if (curr) {
curr.classList.remove('active');
index > 0 ? index-- : "";
}
}
setTimeout(function () {
stop = false;
}, 1000);
}
});
}(window, document));
<div class="wrapper">
<div class="circle">
<i></i>
</div>
<div class="circle">
<i></i>
</div>
<div class="circle">
<i></i>
</div>
</div>
body, html {
width: 100%;
height: 100%;
}
.wrapper {
width: 100%;
text-align: justify;
background-color: #000;
&:after {
content: "";
display: inline-block;
width: 100%;
}
.circle {
display: inline-block;
vertical-align: top;
width: 23%;
height: 100%;
i {
display: block;
background-color: yellow;
width: 100%;
padding-bottom: 100%;
border-radius: 50%;
}
}
}
var link = document.createElement("a");
link.href = "test";
link.download = "test.zip";
var event = document.createEvent("MouseEvents");
event.initMouseEvent("click", true, false, self, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
link.dispatchEvent(event);
var latestKnownScrollY = $('html').scrollTop() || $('body').scrollTop();
$(window).on("scroll", function () {
latestKnownScrollY = $('html').scrollTop() || $('body').scrollTop();
});
$(window).on("mousewheel DOMMouseScroll", function(event) {
var scrollTo,
scrollDistance = 400,
delta;
if (event.type == 'mousewheel') {
delta = event.originalEvent.wheelDelta / 120;
} else if (event.type == 'DOMMouseScroll') {
delta = - event.originalEvent.detail / 3;
}
scrollTo = latestKnownScrollY - delta * scrollDistance;
if (scrollTo) {
event.preventDefault();
event.stopPropagation();
$('body,html').stop().animate( {
scrollTop : scrollTo
} , 500);
}
} );
<div class="wrapper"></div>
.wrapper {
color: red;
width: 100%;
margin-top: 10px;
}
function getStyle(className) {
var classes = document.styleSheets[0].rules || document.styleSheets[0].cssRules;
for (var x = 0; x < classes.length; x++) {
if (classes[x].selectorText == className) {
(classes[x].cssText) ? alert(classes[x].cssText) : alert(classes[x].style.cssText);
}
}
}
getStyle('.wrapper');
var ms = $('.catalog_lattice');
var params = mSearch2.Hash.get();
params['action'] = 'filter';
params['pageId'] = mse2Config.pageId;
params['key'] = mse2Config.key;
ms.miniScroll({
limit: 5,
controllerUrl: 'assets/components/msearch2/action.php',
responceType: 'json',
dop: params,
preloderPath: 'assets/templates/ikeds/img/loader.gif',
success: function (responce, elm) {
if (responce.data.results) {
elm.find('.pager').before(responce.data.results);
}
}
});
<div class="wrapper"></div>
body,html {
width: 100%;
height: 100%;
}
.wrapper {
width: 100%;
height: 100%;
transition: background 1s;
background: none;
}
(function (w, d) {
w.onload = function () {
var wp = d.querySelector('.wrapper'),
colors = ['yellow', 'red', 'green', 'blue'],
ln = colors.length;
var changeColor = function (i) {
if (i < ln) {
setTimeout(function () {
wp.style.cssText = "background: " + colors[i] +";";
i++;
changeColor(i);
}, 2000);
} else {
changeColor(0);
}
};
changeColor(0);
};
}(window, document));
<div class="treangle">
<div class="treangle--left"></div>
<div class="treangle--right"></div>
</div>
body, html {
height: 100%;
width: 100%;
}
.treangle {
width: 100%;
height: 100%;
position: relative;
background-color: #000;
overflow: hidden;
[class*='treangle--'] {
width: 100%;
height: 50%;
position: absolute;
background-color: yellow;
}
.treangle--left {
float: left;
left: -50%;
transform: rotate(20deg);
transform: matrix(-1, -0.2, 0, 1, 0, 0);
}
.treangle--right {
float: right;
right: -50%;
transform: rotate(-20deg);
transform: matrix(1, -0.2, 0, 1, 0, 0);
}
}
input:not([type="submit"]) {
display: block;
}
$("div#" + thisColID + " div:first-child").attr('id');
var getBlockInColumn = function() {
var thisColID = $(this).attr('id'), children = $("div#" + thisColID).children();
if (children.length) {
alert($(children[0]).attr('id'));
}
};
$(document).ready(function(){
$(".column").on("click",getBlockInColumn);
});