Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bobcat-su_full
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sergey
bobcat-su_full
Commits
45b00d60
Commit
45b00d60
authored
Jan 10, 2019
by
Sergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add body product
parent
8f9209b8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
35 deletions
+45
-35
item.html
src/item.html
+10
-0
main-list.js
src/js/main-list.js
+35
-35
index.html
src/template/product-title/index.html
+0
-0
No files found.
src/item.html
0 → 100644
View file @
45b00d60
//= template/common/header.html
//= template/menu-list-catalog/index.html
//= template/breadcrumb/index.html
//= template/product-title/index.html
//= template/common/footer.html
\ No newline at end of file
src/js/main-list.js
View file @
45b00d60
'use strict'
;
// 'use strict';
//
(
function
()
{
// (function () {
var
checkActive
=
function
(
list
,
elem
)
{
// var checkActive = function (list, elem) {
list
.
forEach
(
function
(
item
)
{
// list.forEach(function (item) {
console
.
log
(
'Here!'
);
// console.log('Here!');
if
(
item
!==
elem
){
// if(item !== elem){
if
(
item
.
classList
.
contains
(
'active'
)){
// if(item.classList.contains('active')){
item
.
classList
.
remove
(
'active'
);
// item.classList.remove('active');
}
// }
}
// }
})
// })
};
// };
//
var
tabs
=
document
.
querySelector
(
'.menu-list__mainpage'
);
// var tabs = document.querySelector('.menu-list__mainpage');
if
(
tabs
)
{
// if(tabs) {
var
tab
=
tabs
.
querySelectorAll
(
'.menu-list__link'
);
// var tab = tabs.querySelectorAll('.menu-list__link');
tab
.
forEach
(
function
(
item
,
index
)
{
// tab.forEach(function (item, index) {
item
.
addEventListener
(
'click'
,
function
(
evt
)
{
// item.addEventListener('click', function (evt) {
checkActive
(
tab
,
item
);
// checkActive(tab, item);
if
(
item
.
classList
.
contains
(
'active'
)){
// if(item.classList.contains('active')){
//
}
else
{
// }else {
evt
.
preventDefault
();
// evt.preventDefault();
item
.
classList
.
toggle
(
'active'
);
// item.classList.toggle('active');
var
productSlider
=
document
.
querySelectorAll
(
'.product-slider__wrapper'
);
// var productSlider = document.querySelectorAll('.product-slider__wrapper');
productSlider
[
index
].
classList
.
add
(
'active'
);
// productSlider[index].classList.add('active');
checkActive
(
productSlider
,
productSlider
[
index
]);
// checkActive(productSlider, productSlider[index]);
//
}
// }
})
// })
})
// })
}
// }
})();
// })();
\ No newline at end of file
\ No newline at end of file
src/template/product-title/index.html
0 → 100644
View file @
45b00d60
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment