$(#event-date_start)
const chunks = [1,2,3,4,5,6,7].reduce((chunks, value, index) => {
const chunkIndex = Math.floor(index / 3);
if (!chunks[chunkIndex]) {
chunks[chunkIndex] = [];
}
chunks[chunkIndex].push(value);
return chunks;
}, []);
return chunks.map((chunk) => (
<div key={chunk.join(`-`)}>
{chunk.map((value) => (
<div key={value}>
{value}
</div>
))}
</div>
))
<!--[if !IE]><!--><link rel="stylesheet" href="style.css"/><!--<![endif]-->
Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
$('.item').matchHeight()
в $(function() {})
тоже не нужно. Это onLoad, в него должен быть обёрнут весь этот код.function resize() {
if ( $(window).width() < 992 ) {
$('.item').matchHeight();
}
}
$(window).resize(resize);
resize();
const f = (...callbacks) => {
// spread собирает аргументы в массив,
// поэтому и работать с ними можно как с массивом
callbacks.forEach((callback) => callback());
}
f(
() => console.log(1),
() => console.log(2),
() => console.log(42),
);
render() {
if (!this.state.users[0]) {
return null; // Или что угодно
}
return (
<InvestorBoxWrapper>
<InvestorBox>
<WithAva>
<Img src={'...'}/>
<WithAvaH3>
<H3>{this.state.users[0].id}</H3>
<H3>...</H3>
</WithAvaH3>
</WithAva>
<P>...</P>
</InvestorBox>
</InvestorBoxWrapper>
)
}
Какой метод использовать чтобы зарендерить на момент когда есть все данные данные?Нет такого.
http://lorempixel.com/400/200/sports/1
http://lorempixel.com/400/200/sports/2
...
http://lorempixel.com/400/200/sports/10
var size_dopatr = 250;
$('.dop_atr').each(function () {
var dopatrContent = $(this);
dopatrText = dopatrContent.text();
if (dopatrText.length > size_dopatr) {
dopatrContent.text(dopatrText.slice(0, size_dopatr) + ' ...');
}
});