Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
NAP-wordpress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marwa Sfari
NAP-wordpress
Commits
6d84938d
Commit
6d84938d
authored
Aug 02, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update]Redmine - #641 : Image transition
parent
de26c331
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
154 additions
and
107 deletions
+154
-107
main.css
wp-content/themes/nap/assets/css/main.css
+27
-10
main.js
wp-content/themes/nap/assets/js/main.js
+127
-97
No files found.
wp-content/themes/nap/assets/css/main.css
View file @
6d84938d
...
@@ -1092,7 +1092,7 @@ aside.news-wrapper {
...
@@ -1092,7 +1092,7 @@ aside.news-wrapper {
position
:
relative
;
position
:
relative
;
height
:
100%
;
height
:
100%
;
background
:
#fff
;
background
:
#fff
;
overflow-
y
:
hidden
;
overflow-
x
:
hidden
;
opacity
:
0
;
opacity
:
0
;
border-left
:
1px
solid
rgba
(
26
,
26
,
26
,
0.1
);
border-left
:
1px
solid
rgba
(
26
,
26
,
26
,
0.1
);
}
}
...
@@ -1154,7 +1154,9 @@ label.chevron.bottom {
...
@@ -1154,7 +1154,9 @@ label.chevron.bottom {
width
:
120%
;
width
:
120%
;
}
}
label
.chevron.bottom
::first-letter
{
text-transform
:
uppercase
;
}
.pa_format
ul
li
img
{
.pa_format
ul
li
img
{
vertical-align
:
top
;
vertical-align
:
top
;
margin-top
:
-50px
;
margin-top
:
-50px
;
...
@@ -1200,6 +1202,7 @@ label.chevron.bottom {
...
@@ -1200,6 +1202,7 @@ label.chevron.bottom {
margin
:
0
auto
;
margin
:
0
auto
;
position
:
relative
;
position
:
relative
;
}
}
.list
li
.format-desc
,
.pa_format
li
.format-desc
{
.pa_format
li
.format-desc
{
font-size
:
9px
;
font-size
:
9px
;
line-height
:
12px
;
line-height
:
12px
;
...
@@ -1328,7 +1331,7 @@ label.chevron.bottom {
...
@@ -1328,7 +1331,7 @@ label.chevron.bottom {
position
:
relative
;
position
:
relative
;
}
}
.product-list
figure
img
{
.product-list
figure
img
{
height
:
1
00%
;
height
:
1
80px
;
object-fit
:
cover
;
object-fit
:
cover
;
}
}
...
@@ -1606,6 +1609,7 @@ label.chevron.bottom {
...
@@ -1606,6 +1609,7 @@ label.chevron.bottom {
left
:
0
;
left
:
0
;
opacity
:
0
;
opacity
:
0
;
visibility
:
hidden
;
visibility
:
hidden
;
margin-left
:
-4px
;
}
}
.filter-list
.top-header
{
.filter-list
.top-header
{
margin-bottom
:
25px
;
margin-bottom
:
25px
;
...
@@ -1739,21 +1743,36 @@ label.chevron.bottom {
...
@@ -1739,21 +1743,36 @@ label.chevron.bottom {
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
height
:
100%
;
height
:
100%
;
top
:
-100%
;
top
:
0
;
bottom
:
0
;
bottom
:
0
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
background-size
:
cover
;
background-size
:
cover
;
background-position
:
90%
;
background-position
:
90%
;
z-index
:
0
;
}
.top-100
{
/*top: -100%;*/
}
.transition-0
{
-webkit-transition
:
all
0s
ease-in-out
;
-moz-transition
:
all
0s
ease-in-out
;
-o-transition
:
all
0s
ease-in-out
;
-ms-transition
:
all
0s
ease-in-out
;
transition
:
all
0s
ease-in-out
;
}
.transition-1
{
-webkit-transition
:
all
1s
ease-in-out
;
-webkit-transition
:
all
1s
ease-in-out
;
-moz-transition
:
all
1s
ease-in-out
;
-moz-transition
:
all
1s
ease-in-out
;
-o-transition
:
all
1s
ease-in-out
;
-o-transition
:
all
1s
ease-in-out
;
-ms-transition
:
all
1s
ease-in-out
;
-ms-transition
:
all
1s
ease-in-out
;
transition
:
all
1s
ease-in-out
;
transition
:
all
1s
ease-in-out
;
z-index
:
0
;
}
}
.cover-wrapper.current-cover
{
.cover-wrapper.current-cover
{
z-index
:
3
!important
;
top
:
0
!important
;
top
:
0
!important
;
z-index
:
3
!important
;
}
.cover-wrapper.last-current-cover
{
z-index
:
3
!important
;
}
}
.cover-wrapper.current-cover
p
{
.cover-wrapper.current-cover
p
{
opacity
:
1
;
opacity
:
1
;
...
@@ -1765,12 +1784,10 @@ label.chevron.bottom {
...
@@ -1765,12 +1784,10 @@ label.chevron.bottom {
}
}
.cover-wrapper.prev
{
.cover-wrapper.prev
{
top
:
-100%
;
top
:
-100%
;
z-index
:
4
!important
;
}
}
.cover-wrapper.next
{
.cover-wrapper.next
{
top
:
100%
;
display
:
block
;
display
:
block
;
z-index
:
2
;
top
:
0
;
}
}
.cover-wrapper.last
{
.cover-wrapper.last
{
/*z-index: 0;*/
/*z-index: 0;*/
...
@@ -1804,7 +1821,7 @@ label.chevron.bottom {
...
@@ -1804,7 +1821,7 @@ label.chevron.bottom {
margin-top
:
27px
;
margin-top
:
27px
;
}
}
.panel
.product-list
article
{
.panel
.product-list
article
{
height
:
195px
;
/* height: 195px;*/
width
:
170px
;
width
:
170px
;
display
:
inline-block
;
display
:
inline-block
;
cursor
:
pointer
;
cursor
:
pointer
;
...
...
wp-content/themes/nap/assets/js/main.js
View file @
6d84938d
...
@@ -37,7 +37,7 @@ $(function(){
...
@@ -37,7 +37,7 @@ $(function(){
$
(
'.gallery-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated visible-elem fadeInUp'
);
$
(
'.gallery-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated visible-elem fadeInUp'
);
},
0
)
},
0
)
});
});
});
});
//Get file name of uploaded file
//Get file name of uploaded file
$
(
'#file-p'
).
on
(
'change'
,
function
(
e
){
$
(
'#file-p'
).
on
(
'change'
,
function
(
e
){
var
fileName
=
e
.
target
.
files
[
0
].
name
;
var
fileName
=
e
.
target
.
files
[
0
].
name
;
...
@@ -56,9 +56,9 @@ $(function(){
...
@@ -56,9 +56,9 @@ $(function(){
$
(
'.popup-container'
).
fadeIn
();
$
(
'.popup-container'
).
fadeIn
();
// $('#user_login').attr('placeholder', 'Identifiant');
// $('#user_login').attr('placeholder', 'Identifiant');
// $('#user_pass').attr('placeholder', 'Mot de passe');
// $('#user_pass').attr('placeholder', 'Mot de passe');
$
(
'.popup-first'
).
removeClass
(
'fadeOutDown '
).
addClass
(
'animated visible-elem pulse'
);
$
(
'.popup-first'
).
removeClass
(
'fadeOutDown '
).
addClass
(
'animated visible-elem pulse'
);
});
});
//Close popup
//Close popup
$
(
'.popup-first .close-btn'
).
click
(
$
(
'.popup-first .close-btn'
).
click
(
function
(){
function
(){
...
@@ -101,12 +101,13 @@ $(function(){
...
@@ -101,12 +101,13 @@ $(function(){
{
{
srcImage
=
$
(
'#home .img-wrapper'
).
data
(
'defaultimg'
);
srcImage
=
$
(
'#home .img-wrapper'
).
data
(
'defaultimg'
);
}
}
setTimeout
(
function
(){
$
(
'.img-wrapper'
).
stop
().
animate
({
opacity
:
1
,
},
500
,
function
()
{
$
(
'.img-wrapper'
).
css
({
$
(
'.img-wrapper'
).
css
({
'background-image'
:
"url("
+
srcImage
+
")"
,
'background-image'
:
"url("
+
srcImage
+
")"
'opacity'
:
1
})
}).
one
(
'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend'
,
function
(
e
)
{});
});
},
300
)
}
}
$
.
fn
.
showSubmenu
=
function
(){
$
.
fn
.
showSubmenu
=
function
(){
var
currentPage
=
$
(
'.container'
).
data
(
'page'
);
var
currentPage
=
$
(
'.container'
).
data
(
'page'
);
...
@@ -159,63 +160,63 @@ $(function(){
...
@@ -159,63 +160,63 @@ $(function(){
$this
.
addClass
(
'active'
);
$this
.
addClass
(
'active'
);
$
(
'.filter-bloc .bloc-content'
).
slideUp
(
'slow'
);
$
(
'.filter-bloc .bloc-content'
).
slideUp
(
'slow'
);
$this
.
find
(
'.bloc-content'
).
slideDown
(
'slow'
);
$this
.
find
(
'.bloc-content'
).
slideDown
(
'slow'
);
$
(
'.commercial'
).
slideUp
(
'slow'
);
$
(
'.commercial'
).
slideUp
(
'slow'
);
}
else
{
}
else
{
$this
.
removeClass
(
'active'
);
$this
.
removeClass
(
'active'
);
$this
.
find
(
'.bloc-content'
).
slideUp
(
'slow'
);
$this
.
find
(
'.bloc-content'
).
slideUp
(
'slow'
);
//$('.commercial').slideDown('slow');
//$('.commercial').slideDown('slow');
}
}
}).
on
(
'click'
,
'.filter-bloc li:not(.disabled,.reinit)'
,
function
(
e
){
}).
on
(
'click'
,
'.filter-bloc li:not(.disabled,.reinit)'
,
function
(
e
){
e
.
stopPropagation
();
e
.
stopPropagation
();
$
(
this
).
toggleClass
(
'selected'
);
$
(
this
).
toggleClass
(
'selected'
);
var
e
=
$
(
this
).
parent
().
find
(
'.selected'
).
length
,
var
e
=
$
(
this
).
parent
().
find
(
'.selected'
).
length
,
parentFilter
=
$
(
this
).
parent
().
parent
().
parent
();
parentFilter
=
$
(
this
).
parent
().
parent
().
parent
();
e
?
parentFilter
.
addClass
(
'selected-filter'
)
:
parentFilter
.
removeClass
(
'selected-filter'
)
;
e
?
parentFilter
.
addClass
(
'selected-filter'
)
:
parentFilter
.
removeClass
(
'selected-filter'
)
;
}).
on
(
'click'
,
'.filter-bloc .reinit'
,
function
(){
}).
on
(
'click'
,
'.filter-bloc .reinit'
,
function
(){
selector
=
$
(
this
).
parent
().
parent
();
selector
=
$
(
this
).
parent
().
parent
();
selector
.
parent
().
reinitFilter
();
selector
.
parent
().
reinitFilter
();
selector
.
find
(
'li'
).
reinitFilter
();
selector
.
find
(
'li'
).
reinitFilter
();
}).
on
(
'click'
,
'.reinit-all'
,
function
(){
}).
on
(
'click'
,
'.reinit-all'
,
function
(){
$
(
'.filter-bloc , .filter-bloc li'
).
reinitFilter
();
$
(
'.filter-bloc , .filter-bloc li'
).
reinitFilter
();
});
});
}
}
$
.
fn
.
changeProductImageBg
=
function
(){
$
.
fn
.
changeProductImageBg
=
function
(){
var
var
selectedColor
=
checkWhiteColor
(
$
(
this
).
data
(
"color"
)),
selectedColor
=
checkWhiteColor
(
$
(
this
).
data
(
"color"
)),
selectedImage
=
$
(
this
).
data
(
"image"
),
selectedImage
=
$
(
this
).
data
(
"image"
),
linkProduct
=
$
(
this
).
data
(
"link"
),
linkProduct
=
$
(
this
).
data
(
"link"
),
tl
=
new
TimelineMax
(),
tl
=
new
TimelineMax
(),
container
=
$
(
this
).
parent
().
parent
();
container
=
$
(
this
).
parent
().
parent
();
container
.
find
(
'.article-bg'
).
css
({
"background-color"
:
selectedColor
,
opacity
:
'0.1'
});
container
.
find
(
'.article-bg'
).
css
({
"background-color"
:
selectedColor
,
opacity
:
'0.1'
});
container
.
find
(
'img'
).
attr
({
'src'
:
selectedImage
,
'data-link'
:
linkProduct
});
container
.
find
(
'img'
).
attr
({
'src'
:
selectedImage
,
'data-link'
:
linkProduct
});
tl
.
fromTo
(
container
.
find
(
'img'
),
1
,{
opacity
:
0
,
visibility
:
"hidden"
},{
opacity
:
1
,
visibility
:
"visible"
},
0
);
tl
.
fromTo
(
container
.
find
(
'img'
),
1
,{
opacity
:
0
,
visibility
:
"hidden"
},{
opacity
:
1
,
visibility
:
"visible"
},
0
);
}
}
$
.
fn
.
animatePageScroll
=
function
(
element
,
duration
)
{
$
.
fn
.
animatePageScroll
=
function
(
element
,
duration
)
{
return
$
(
this
).
fromTo
(
element
,
duration
,
return
$
(
this
).
fromTo
(
element
,
duration
,
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
0
,
visibility
:
"hidden"
,
marginBottom
:
'80px'
},
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
0.7
);
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
0.7
);
}
}
$
.
fn
.
fullpageSlide
=
function
(){
$
.
fn
.
fullpageSlide
=
function
(){
var
var
timeout
=
1.7
,
timeout
=
1.7
,
duration
=
1.2
;
duration
=
1.2
;
setTimeout
(
function
(){
setTimeout
(
function
(){
$
(
'.moveDown'
).
removeClass
(
'hidden-elem'
).
addClass
(
'visible-elem animated rollIn'
);
$
(
'.moveDown'
).
removeClass
(
'hidden-elem'
).
addClass
(
'visible-elem animated rollIn'
);
},
2000
);
},
2000
);
$
(
"#fullpage .section"
).
first
().
addClass
(
'first'
);
$
(
"#fullpage .section"
).
first
().
addClass
(
'first'
);
$
(
this
).
fullpage
({
$
(
this
).
fullpage
({
verticalCentered
:
false
,
verticalCentered
:
false
,
css3
:
false
,
css3
:
false
,
scrollingSpeed
:
1500
,
scrollingSpeed
:
1500
,
lazyLoading
:
false
,
lazyLoading
:
false
,
fixedElements
:
'footer'
,
fixedElements
:
'footer'
,
controlArrows
:
true
,
controlArrows
:
true
,
fitToSectionDelay
:
800000
,
fitToSectionDelay
:
800000
,
fadingEffect
:
true
,
fadingEffect
:
true
,
afterLoad
:
function
(
anchor
,
index
){
afterLoad
:
function
(
anchor
,
index
){
tl1
=
new
TimelineMax
();
tl1
=
new
TimelineMax
();
var
firstSection
=
$
(
"#fullpage .section.first"
);
var
firstSection
=
$
(
"#fullpage .section.first"
);
//tl1.animatePageScroll(firstSection,duration);
//tl1.animatePageScroll(firstSection,duration);
//console.log(animation);
//console.log(animation);
tl1
.
fromTo
(
firstSection
.
find
(
'.bloc .header-bloc'
),
1.5
,
tl1
.
fromTo
(
firstSection
.
find
(
'.bloc .header-bloc'
),
1.5
,
...
@@ -255,13 +256,13 @@ $(function(){
...
@@ -255,13 +256,13 @@ $(function(){
}
}
},
},
});
});
$
(
document
).
on
(
'click'
,
'.moveDown'
,
function
(){
$
(
document
).
on
(
'click'
,
'.moveDown'
,
function
(){
$
.
fn
.
fullpage
.
moveSectionDown
();
$
.
fn
.
fullpage
.
moveSectionDown
();
});
});
}
}
$
.
fn
.
getMenuBg
=
function
(){
$
.
fn
.
getMenuBg
=
function
(){
//debugger;
//debugger;
var
imgSrc
=
$
(
'header .nav-content > ul'
).
find
(
' > li.current'
).
data
(
'img'
);
var
imgSrc
=
$
(
'header .nav-content > ul'
).
find
(
' > li.current'
).
data
(
'img'
);
navwWidth
=
$
(
'.nav-wrapper'
).
width
();
navwWidth
=
$
(
'.nav-wrapper'
).
width
();
...
@@ -288,6 +289,7 @@ $.fn.getMenuBg = function(){
...
@@ -288,6 +289,7 @@ $.fn.getMenuBg = function(){
maxHeight
=
productHeight
>
windowHeight
?
productHeight
:
containerHeight
,
maxHeight
=
productHeight
>
windowHeight
?
productHeight
:
containerHeight
,
galleryWidth
=
windowWidth
-
navPhototequeWidth
,
galleryWidth
=
windowWidth
-
navPhototequeWidth
,
filterWidth
=
$
(
'.right-container .left-panel'
).
outerWidth
(),
filterWidth
=
$
(
'.right-container .left-panel'
).
outerWidth
(),
lastSectionHeight
=
$
(
'#catalogue .panel-content section'
).
last
().
outerHeight
(),
footerContact
=
$
(
'.contact-form .footer'
).
outerHeight
();
footerContact
=
$
(
'.contact-form .footer'
).
outerHeight
();
$
(
'.gallery-wrapper'
).
outerWidth
(
galleryWidth
).
css
(
'margin-left'
,
navPhototequeWidth
)
;
$
(
'.gallery-wrapper'
).
outerWidth
(
galleryWidth
).
css
(
'margin-left'
,
navPhototequeWidth
)
;
$
(
'.main,.load-page'
).
outerHeight
(
containerHeight
);
$
(
'.main,.load-page'
).
outerHeight
(
containerHeight
);
...
@@ -299,13 +301,14 @@ $.fn.getMenuBg = function(){
...
@@ -299,13 +301,14 @@ $.fn.getMenuBg = function(){
$
(
'.right-panel'
).
outerWidth
(
windowWidth
-
(
navMenuWidth
+
filterWidth
));
$
(
'.right-panel'
).
outerWidth
(
windowWidth
-
(
navMenuWidth
+
filterWidth
));
$
(
'.contact-form'
).
height
(
windowHeight
-
footerHeight
);
$
(
'.contact-form'
).
height
(
windowHeight
-
footerHeight
);
$
(
'.contact-form .inner-form'
).
outerHeight
(
windowHeight
-
footerContact
);
$
(
'.contact-form .inner-form'
).
outerHeight
(
windowHeight
-
footerContact
);
$
(
'#catalogue .panel-content section'
).
last
().
height
(
windowHeight
-
footerHeight
);
if
(
lastSectionHeight
<
windowHeight
-
footerHeight
)
$
(
'#catalogue .panel-content section'
).
last
().
height
(
windowHeight
-
footerHeight
);
}
}
//Wordpress js login
//Wordpress js login
$
(
'#user_login'
).
attr
(
'placeholder'
,
'Identifiant'
);
$
(
'#user_login'
).
attr
(
'placeholder'
,
'Identifiant'
);
$
(
'#user_pass'
).
attr
(
'placeholder'
,
'Mot de passe'
);
$
(
'#user_pass'
).
attr
(
'placeholder'
,
'Mot de passe'
);
$
(
"#user_login"
).
addClass
(
"my-login-username"
);
$
(
"#user_login"
).
addClass
(
"my-login-username"
);
$
(
"#wp-submit"
).
addClass
(
"btn rounded white-btn"
);
$
(
"#wp-submit"
).
addClass
(
"btn rounded white-btn"
);
});
//END Function
});
//END Function
...
@@ -346,34 +349,46 @@ $.fn.animation = function(){
...
@@ -346,34 +349,46 @@ $.fn.animation = function(){
setTimeout
(
function
(){
$
(
'.form-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated fadeInUp'
)},
1000
)
setTimeout
(
function
(){
$
(
'.form-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated fadeInUp'
)},
1000
)
animateOnScroll
();
animateOnScroll
();
}
}
function
onScrollCover
(
event
){
function
onScrollCover
(
direction
){
$
(
'.subcat a'
).
each
(
function
()
{
cover
=
$
(
'.subcat a.active'
).
attr
(
"href"
);
if
(
$
(
this
).
hasClass
(
'active'
)){
$
(
'.cover-wrapper'
).
each
(
function
()
{
cover
=
$
(
this
).
attr
(
"href"
);
coverWrapper
=
$
(
this
).
data
(
'cat'
);
$
(
'.cover-wrapper'
).
each
(
function
()
{
if
(
coverWrapper
==
cover
&&
!
(
$
(
this
).
hasClass
(
'current-cover'
)))
{
$
(
'.cover-wrapper'
).
last
().
addClass
(
'last'
);
$
(
'.cover-wrapper'
).
removeClass
(
'last-current-cover'
);
$
(
'.cover-wrapper'
).
first
().
addClass
(
'first'
);
$
(
'.current-cover'
).
addClass
(
'last-current-cover'
);
coverWrapper
=
$
(
this
).
data
(
'cat'
);
$
(
'.cover-wrapper'
).
removeClass
(
'prev next current-cover'
);
if
(
coverWrapper
==
cover
)
{
$
(
this
).
prevAll
(
'.cover-wrapper'
).
addClass
(
'prev'
);
$
(
'.cover-wrapper'
).
removeClass
(
'prev next current-cover'
);
$
(
this
).
nextAll
(
'.cover-wrapper'
).
addClass
(
'next'
);
$
(
this
).
prev
(
'.cover-wrapper'
).
addClass
(
'prev'
);
//animated slideInUp visible-elem
$
(
this
).
addClass
(
'current-cover '
);
$
(
this
).
next
(
'.cover-wrapper'
).
addClass
(
'next'
);
$
(
this
).
addClass
(
'current-cover'
);
if
(
$
(
'.first'
).
hasClass
(
'prev'
))
{
$
(
'.next'
).
css
(
'z-index'
,
'1'
);
}
}
});
}
}
});
});
};
};
var
lastScrollTop
=
0
;
function
onScroll
(
event
){
function
onScroll
(
event
){
var
scrollPos
=
$
(
this
).
scrollTop
(),
var
st
=
$
(
this
).
scrollTop
();
items
=
event
.
data
.
items
;
if
(
st
>
lastScrollTop
){
onScrollCover
();
var
direction
=
"down"
;
$
(
items
).
each
(
function
()
{
}
var
currLink
=
$
(
this
);
else
if
(
st
===
lastScrollTop
)
var
refElement
=
$
(
currLink
.
attr
(
"href"
));
{
//In IE this is an important condition because there seems to be some instances where the last scrollTop is equal to the new one
}
else
{
var
direction
=
"up"
;
}
lastScrollTop
=
st
;
var
scrollPos
=
$
(
this
).
scrollTop
(),
//items = event.data.items;
items
=
"li .subcat a"
;
if
(
timer
)
clearTimeout
(
timer
);
timer
=
setTimeout
(
function
(){
onScrollCover
(
direction
);
},
330
);
$
(
items
).
each
(
function
()
{
var
currLink
=
$
(
this
);
var
refElement
=
$
(
currLink
.
attr
(
"href"
));
//console.log(currLink);
//console.log(currLink);
if
(
refElement
.
length
&&
refElement
.
position
().
top
-
20
<=
scrollPos
&&
refElement
.
position
().
top
+
refElement
.
height
()
>
scrollPos
)
{
if
(
refElement
.
length
&&
refElement
.
position
().
top
-
20
<=
scrollPos
&&
refElement
.
position
().
top
+
refElement
.
height
()
>
scrollPos
)
{
$
(
'.subcat a'
).
removeClass
(
"active"
);
$
(
'.subcat a'
).
removeClass
(
"active"
);
...
@@ -393,7 +408,7 @@ function onScroll(event){
...
@@ -393,7 +408,7 @@ function onScroll(event){
}
}
});
});
}
}
function
scrollAnchor
(
elemId
,
skipZero
){
function
scrollAnchor
(
elemId
,
skipZero
){
$
(
'.subcat a[href^="#"]'
).
on
(
'click'
,
function
(
e
)
{
$
(
'.subcat a[href^="#"]'
).
on
(
'click'
,
function
(
e
)
{
...
@@ -424,10 +439,18 @@ function scrollAnchor(elemId, skipZero){
...
@@ -424,10 +439,18 @@ function scrollAnchor(elemId, skipZero){
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
initFunction
();
initFunction
();
});
//END document load
});
//END document load
$
(
window
).
on
(
"scroll"
,{
items
:
"li .subcat a"
},
onScroll
)
var
timer
;
$
(
window
).
scroll
(
function
(
e
)
{
onScroll
(
e
)
/* clearTimeout(timer);
timer = setTimeout(function() {
$(window).trigger("scrollStop");
}, 330);*/
});
//$(window).bind("scrollStop",onScroll)
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
$
(
'.nav-content li'
).
on
(
'mouseover'
,
function
(){
$
(
'.nav-content li'
).
on
(
'mouseover'
,
function
(){
$
(
this
).
stop
(
tru
e
,
true
).
fadeImage
();
$
(
this
).
stop
(
fals
e
,
true
).
fadeImage
();
});
});
// Catalog Page : Change product image depending on selected color
// Catalog Page : Change product image depending on selected color
$
(
'.product-list article ul li'
).
on
(
'mouseover'
,
function
(){
$
(
'.product-list article ul li'
).
on
(
'mouseover'
,
function
(){
...
@@ -449,6 +472,13 @@ $(document).ready(function(){
...
@@ -449,6 +472,13 @@ $(document).ready(function(){
$
.
fn
.
responsive
();
$
.
fn
.
responsive
();
$
(
'.list-color-filter li'
).
setBgColorList
();
$
(
'.list-color-filter li'
).
setBgColorList
();
$
.
fn
.
animation
();
//Global animation for entire site
$
.
fn
.
animation
();
//Global animation for entire site
//TODO
$
(
'.cover-wrapper'
).
last
().
addClass
(
'last'
);
$
(
'.cover-wrapper'
).
first
().
addClass
(
'first'
);
});
//end document ready
});
//end document ready
$
(
window
).
resize
(
function
()
{
$
(
window
).
resize
(
function
()
{
...
...
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