([^;]*)?;([^;]*)?;([^;]*)?;([^;]*)?;([^;]*)?;([^;\r\n]*)?\n*
\{\n\tmodel: '$1',\n\tyears: \[\{\n\t\tyear: '$2',\n\t\tengines: \[\n\t\t\t\{ engine: '$3', image: '$4', work: '$5', parts: '$6' \}\n\t\t\]\n\},\n
<div style="float:left;width:400px;height:400px"> </div>
<div style="float:left;width:200px;height:200px"> </div>
<div style="float:left;width:200px;height:200px"> </div>
<div style="float:left;width:200px;height:200px"> </div>
<div style="float:left;width:200px;height:200px"> </div>
<div style="float:left;width:200px;height:200px"> </div>
<div style="float:left;width:200px;height:200px"> </div>
<br style="clear:both;/>
var model = {
var1 : [1,2,3,4,5,6,7],
var2 : {
'child_var1' : 'value',
'child_var2' : 'value'
},
var3 : [1,2,3,4,5,6,7],
get : function() {
return this;
}
};
console.log(model)
var allValues = {
1: {
price: [2150,2200,2350,1600,1450,1500,1650,900],
itogo: [1450,1500,1650,900,2150,2200,2350,1600]
},
2: {
price: [1800,1850,2000,1250,1150,1200,1350,600],
itogo: [2300,2400,2700,1200,3600,3700,4000,2500]
},
3: {
price: [1617,1667,1817,1100,1017,1067,1217,467],
itogo: [3050,3200,3650,1400,4850,5000,5450,3300]
},
4: {
price: [1525,1575,1725,1025,950,1000,1150,400],
itogo: [3800,4000,4600,1600,6100,6300,6900,4100]
},
5: {
price: [1470,1520,1670,980,910,960,1110,360],
itogo: [4550,4800,5550,1800,7350,7600,8350,4900]
}
}
function setValues(allValues, i) {
var currency = ' руб.'
var valuesGroup = allValues[i]
for (var n in valuesGroup.price) {
$('#price' + n).html(valuesGroup.price[n] + currency)
}
for (var n in valuesGroup.itogo) {
$('#itogo' + n).html(valuesGroup.itogo[n] + currency)
}
}
setValues(allValues, 2)
// Кешируем значение
var s_cache = $(window).scrollTop();
$(window).scroll(function() {
var st = $(window).scrollTop(), d = st - s_cache;
if(d > 0) {
// Скроллим вниз
}
else {
// Скроллим вверх
}
s_cache = st;
});