const container = document.querySelector('nav');
const itemSelector = '.sidebar-item';
const className = 'selected';
container.addEventListener('click', function(e) {
const item = e.target.closest(itemSelector);
if (item) {
const activeItem = this.querySelector(`.${className}`);
if (activeItem) {
activeItem.classList.remove(className);
}
item.classList.add(className);
}
});
container.addEventListener('click', e => {
const item = e.target.closest(itemSelector);
if (item) {
for (const n of e.currentTarget.querySelectorAll(itemSelector)) {
n.classList.toggle(className, n === item);
}
}
});
const items = container.querySelectorAll(itemSelector);
const onClick = e => items.forEach(n => n.classList.toggle(className, n === e.currentTarget));
items.forEach(n => n.addEventListener('click', onClick));
export default (state = initState, action) => {
if(action.type === 'ADD_VAL'){
return [
...state,
action.date
];
}
return state;
};
const values = (state = initState, action) => {
if(action.type === 'ADD_VAL'){
return [
...state,
action.date
];
}
return state;
};
export default values;
table tbody tr > td.show:nth-last-of-type(2)
<div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li>
<li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li>
<li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li>
<li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="home">...</div>
<div role="tabpanel" class="tab-pane" id="profile">...</div>
<div role="tabpanel" class="tab-pane" id="messages">...</div>
<div role="tabpanel" class="tab-pane" id="settings">...</div>
</div>
</div>
<div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#home-tab" id="home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li>
<li role="presentation"><a href="#profile-tab" id="profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li>
<li role="presentation"><a href="#messages-tab" id="messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li>
<li role="presentation"><a href="#settings-tab" id="settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="home-tab">...</div>
<div role="tabpanel" class="tab-pane" id="profile-tab">...</div>
<div role="tabpanel" class="tab-pane" id="messages-tab">...</div>
<div role="tabpanel" class="tab-pane" id="settings-tab">...</div>
</div>
</div>
site.ru/tabs#message
, то скролл будет работать..row:hover {
// Next row, slides are above their columns, giving downward motion on hover
& ~ .row .slide { transform: translateY(-100%); }
// Current row, slides to the right of their columns, giving left motion on hover
.slide { transform: translateX(100%); }
// Current row, next slides, slides to the left of their columns, giving right motion on hover
& .col:hover ~ .col .slide { transform: translateX(-100%); }
// Current slide
.col:hover .slide {
transform: none;
visibility: visible;
transition-delay: 0s;
}
}