!important
используется в functional css (tachyons, basscss).text-center {
text-align: center !important;
}
.text-center
const list = [1, 2, 3, 4, 5];
const randomIndex = max => Math.floor(Math.random() * max);
function dropThemRandomly(nums) {
return function() {
const dropped = nums[randomIndex(nums.length)];
nums = nums.filter(num => num !== dropped);
console.log(dropped);
return dropped;
};
}
const dropper = dropThemRandomly(list);
// вызываю dropper() пять раз
[1, 2, 3, 4, 5].forEach( () => dropper() );
const grid = document.querySelector('.js-filterable-gallery');
const gallery = new Isotope( grid, {
itemSelector: '.js-filterable-item',
layoutMode: 'fitRows',
});
gallery.imagesLoaded().progress( function() {
gallery.isotope('layout');
});