<div class="clearfix"></div>
var isRes = false;
$(window).scroll(function(){
var contentTop = $('.content').offset().top;
var left_sideTop = $('.left_side').offset().top;
var left_sideHeight = $('.left_side').height();
var parentLeftSideHeight = $('.content').height();
if (left_sideTop + left_sideHeight >= contentTop + parentLeftSideHeight) {
if (!isRes) {
isRes = true;
$('.left_side').removeClass('fixedblockLeftSide');
$('.left_side').addClass('positionLeftSide');
};
} else {
isRes = false;
};
});
var id, name, img, url;
var array = [
{id:1,name:"name1",img:"/images/img1.jpg",url:"http://url.ru/1"},
{id:2,name:"name2",img:"/images/img2.jpg",url:"http://url.ru/2"}
];
var d = $('div').data('price');
var arr = d.split("'");
$.each(array,function(index,value){
if (arr[1] == value["id"]){
id = value["id"];
name = value["name"];
img = value["img"];
url = value["url"];
};
console.log('id: ' + id + '; name: ' + name + '; img: ' + img + '; url: ' + url);
});
var x = $('.slick-slide:eq('+nextSlide+')').next().find('.popup').data('bg');
$("div").each(function(){
if($(this).text()=='Ещё больше интересного и полезного'){
$(this).remove();
}
});
$('form input[type=file]').change(function() {
if ($('form input[type=file]').val() != '') {
$('form input[type=submit]').show();
} else {
$('form input[type=submit]').hide();
}
});
<?php
for ($i=1; $i < 10; $i++) {
if ($i % 2)
{
echo $i;
}
else
{
echo $i;
}
}
?>