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
112f3942
Commit
112f3942
authored
Sep 22, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix]Catalog : click on product when load
parent
50cb8552
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
main.js
wp-content/themes/nap/assets/js/main.js
+7
-5
product.js
wp-content/themes/nap/assets/js/product.js
+4
-4
No files found.
wp-content/themes/nap/assets/js/main.js
View file @
112f3942
...
...
@@ -85,7 +85,7 @@ var initFunction = function() {
setTimeout
(
function
()
{
$
(
'.gallery-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated visible-elem fadeInUp'
);
$
.
fn
.
responsive
();
},
10
0
);
},
33
0
);
}
function
appendLoading
()
{
if
(
!
(
$
(
'body #loading-container-subpage'
).
length
))
{
...
...
@@ -133,6 +133,7 @@ var initFunction = function() {
if
(
windowWidth
>
860
){
e
.
preventDefault
();
}
$
(
'html'
).
css
(
'overflow'
,
'hidden'
);
var
link
=
$
(
this
).
attr
(
"href"
);
if
(
!
(
$
(
'.right-container #loading-container-subpage'
).
length
))
{
$
(
'.right-container'
).
append
(
$
(
'#loading-container-subpage'
).
clone
());
...
...
@@ -148,6 +149,7 @@ var initFunction = function() {
$
(
'.right-container'
).
load
(
link
,
{
'ajax'
:
1
},
function
()
{
// $('#fullpage').fullpageSlide(); //Stories
// $('.filter-wrapper').open_filter();
$
(
'html'
).
css
(
'overflow'
,
'auto'
);
var
dataElem
=
$
(
document
).
find
(
".data-elem"
);
var
postId
=
dataElem
.
data
(
'postid'
);
var
page
=
dataElem
.
data
(
'page'
);
...
...
@@ -221,8 +223,8 @@ var initFunction = function() {
//END load content page on left Panel
$
(
document
).
on
(
'click'
,
'.int-link'
,
function
(
e
)
{
e
.
preventDefault
();
$
(
'.load-page'
).
parent
().
removeClass
(
'active'
);
$
(
'.load-page'
).
parent
().
css
(
'left'
,
'100%'
);
$
(
document
).
find
(
'.load-page'
).
parent
().
removeClass
(
'active'
);
$
(
document
).
find
(
'.load-page'
).
parent
().
css
(
'left'
,
'100%'
);
history
.
pushState
(
null
,
null
,
$
(
this
).
find
(
'a'
).
attr
(
'href'
));
$
(
'html'
).
css
(
'overflow'
,
'auto'
);
tlProduct
.
reverse
();
...
...
@@ -667,7 +669,7 @@ var initFunction = function() {
timer
=
setTimeout
(
function
()
{
onScrollCover
();
},
60
0
);
},
33
0
);
$
(
items
).
each
(
function
()
{
var
currLink
=
$
(
this
);
var
refElement
=
$
(
currLink
.
attr
(
"href"
));
...
...
@@ -765,7 +767,7 @@ var initFunction = function() {
$
.
fn
.
showSubmenu
();
//Catalog subMenu
setTimeout
(
function
()
{
onScrollCover
();
},
60
0
);
},
33
0
);
$
(
'#fullpage'
).
fullpageSlide
();
//Stories
$
.
fn
.
responsive
();
$
(
'.list-color-filter li'
).
setBgColorList
();
...
...
wp-content/themes/nap/assets/js/product.js
View file @
112f3942
...
...
@@ -351,17 +351,17 @@ $(function(){
tlProduct
.
staggerFromTo
(
'.product-details .list'
,
0.4
,{
opacity
:
0
,
marginLeft
:
"-10%"
},{
opacity
:
1
,
marginLeft
:
"0"
},
0.4
,
0.2
);
tlProduct
.
fromTo
(
'.product-info'
,
0.4
,{
autoAlpha
:
0
,
marginLeft
:
"-10%"
},{
autoAlpha
:
1
,
marginLeft
:
"0"
},
0.5
);
}
$
(
'.product-list article img, .product-list article ul li'
).
on
(
'click'
,
function
()
{
$
(
document
).
on
(
'click'
,
'.product-list article img, .product-list article ul li'
,
function
()
{
//localStorage['from-site'] = true;
$
(
'head'
).
append
(
$
(
'.header-shop'
));
var
toLink
=
$
(
this
).
data
(
'link'
);
$
(
document
).
attr
(
"title"
,
$
(
this
).
data
(
'title'
));
// $(document).attr("description", $(this).data('description'));
// $.post(toLink, { fromSite: true});
//$.cookie("formSite", 1);
$
(
'.load-page'
).
parent
().
addClass
(
'active'
);
$
(
'.load-page'
).
load
(
toLink
,{
'ajax'
:
1
},
function
(){
$
(
document
).
find
(
'.load-page'
).
parent
().
addClass
(
'active'
);
$
(
document
).
find
(
'.load-page'
).
parent
().
css
(
'left'
,
0
);
$
(
document
).
find
(
'.load-page'
).
load
(
toLink
,{
'ajax'
:
1
},
function
(){
history
.
pushState
(
null
,
null
,
toLink
);
jQuery
(
'.variations_form'
).
wc_variation_form
();
loadProductContent
();
...
...
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