background: rgba(245,245,245,1);
background: -moz-linear-gradient(top, rgba(245,245,245,1) 0%, rgba(246,246,246,1) 50%, rgba(237,237,237,1) 100%);
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(245,245,245,1)), color-stop(50%, rgba(246,246,246,1)), color-stop(100%, rgba(237,237,237,1)));
background: -webkit-linear-gradient(top, rgba(245,245,245,1) 0%, rgba(246,246,246,1) 50%, rgba(237,237,237,1) 100%);
background: -o-linear-gradient(top, rgba(245,245,245,1) 0%, rgba(246,246,246,1) 50%, rgba(237,237,237,1) 100%);
background: -ms-linear-gradient(top, rgba(245,245,245,1) 0%, rgba(246,246,246,1) 50%, rgba(237,237,237,1) 100%);
background: linear-gradient(to bottom, rgba(245,245,245,1) 0%, rgba(246,246,246,1) 50%, rgba(237,237,237,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#ededed', GradientType=0 );
module.exports = () => {
let photo = document.querySelector('.js-big-photo');
if (!photo) return;
photo.addEventListener('click', bigPhoto);
function bigPhoto() {
let photoTitle = document.querySelector('.js-big-photo-title').innerText;
let photoSubtitle = document.querySelector('.js-big-photo-subtitle').innerText;
let imgCrc = this.getAttribute('src');
let mrgnRght = (window.innerWidth) - (document.body.offsetWidth);
let bigPhotoBlock = document.createElement('div');
bigPhotoBlock.className = 'big-photo';
bigPhotoBlock.innerHTML = `<div class="big-photo__box">
<img class="big-photo__photo" src="${imgCrc}">
<div class="big-photo__title">
${photoTitle}
</div>
<div class="big-photo__subtitle">
${photoSubtitle}
</div>
</div>`;
document.body.style.cssText = `overflow: hidden; margin-right: ${mrgnRght}px`;
document.body.appendChild(bigPhotoBlock);
let bgPhtHgth = document.querySelector('.big-photo');
let boxPhoto = bgPhtHgth.querySelector('.big-photo__box');
let posTop = (bgPhtHgth.offsetHeight / 2) - (boxPhoto.offsetHeight / 2);
let posLeft = (bgPhtHgth.offsetWidth / 2) - (boxPhoto.offsetWidth / 2);
boxPhoto.style.cssText = `top: ${posTop}px; left: ${posLeft}px`;
bigPhotoBlock.addEventListener('click', () => {
bigPhotoBlock.parentNode.removeChild(bigPhotoBlock);
document.body.style.cssText = ``;
});
}
};
$( function () {
$( '.register-block-hidden' ).show();
$( '.register' ).on( 'click', function() {
$( '.login-block-visible' ).fadeOut( 500 );
$( '.register-block-hidden' ).fadeIn( 500 );
});
$( '.logir' ).on( 'click', function() {
$( '.login-block-visible' ).fadeIn( 500 );
$( '.register-block-hidden' ).fadeOut( 500 );
});
});
<span class="prev"><</span>
<span class="next">></span>
$( '.prev' ).on('click', function() {
var newSlider = sliderInt - 1;
showSlider(newSlider);
});
$( '.next' ).on('click', function() {
var newSlider = sliderInt + 1;
showSlider(newSlider);
});
$( docunent ).on('click', '.prev', function() {
var newSlider = sliderInt - 1;
showSlider(newSlider);
});
$( documetn ).on('click', '.next', function() {
var newSlider = sliderInt + 1;
showSlider(newSlider);
});
<div id="mapBox">
у него своя высота, которая меняется как я понимаю от размеров монитора и у нас есть див в который обвернута карта <div id="map">
, тогда в JQuery пишем всего две строчки и все будет работатьvar mapHeight = $( '#mapBox' ).height();
$( '#map' ).css('height', mapHeight);
var height = $(window).height(),
width = $(window).width();
if (height > 600 && width > 1900) {
$('.....').animate({
param1: value1,
param2: value2},
speed, function() {
});
} else {
$('.....').animate({
param1: value1,
param2: value2},
speed, function() {
});
};
$('.....').animate
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
Контент
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
корзина
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
категории
</div>
</div>
</div>
</div>
</div>
display: none;
opacity: 0;
<div style="display: none;">счетчик</div>
$( 'button' ).on( 'click', function {
$( 'img' ).addClass( '.media-container' );
} );