Commit 112f3942 authored by imac's avatar imac

[Bugfix]Catalog : click on product when load

parent 50cb8552
...@@ -85,7 +85,7 @@ var initFunction = function() { ...@@ -85,7 +85,7 @@ var initFunction = function() {
setTimeout(function() { setTimeout(function() {
$('.gallery-wrapper').removeClass('hidden-elem').addClass('animated visible-elem fadeInUp'); $('.gallery-wrapper').removeClass('hidden-elem').addClass('animated visible-elem fadeInUp');
$.fn.responsive(); $.fn.responsive();
}, 100); }, 330);
} }
function appendLoading() { function appendLoading() {
if (!($('body #loading-container-subpage').length)) { if (!($('body #loading-container-subpage').length)) {
...@@ -133,6 +133,7 @@ var initFunction = function() { ...@@ -133,6 +133,7 @@ var initFunction = function() {
if (windowWidth > 860){ if (windowWidth > 860){
e.preventDefault(); e.preventDefault();
} }
$('html').css('overflow','hidden');
var link = $(this).attr("href"); var link = $(this).attr("href");
if (!($('.right-container #loading-container-subpage').length)) { if (!($('.right-container #loading-container-subpage').length)) {
$('.right-container').append($('#loading-container-subpage').clone()); $('.right-container').append($('#loading-container-subpage').clone());
...@@ -148,6 +149,7 @@ var initFunction = function() { ...@@ -148,6 +149,7 @@ var initFunction = function() {
$('.right-container').load(link, {'ajax': 1}, function() { $('.right-container').load(link, {'ajax': 1}, function() {
// $('#fullpage').fullpageSlide(); //Stories // $('#fullpage').fullpageSlide(); //Stories
// $('.filter-wrapper').open_filter(); // $('.filter-wrapper').open_filter();
$('html').css('overflow','auto');
var dataElem = $(document).find(".data-elem"); var dataElem = $(document).find(".data-elem");
var postId = dataElem.data('postid'); var postId = dataElem.data('postid');
var page = dataElem.data('page'); var page = dataElem.data('page');
...@@ -221,8 +223,8 @@ var initFunction = function() { ...@@ -221,8 +223,8 @@ var initFunction = function() {
//END load content page on left Panel //END load content page on left Panel
$(document).on('click', '.int-link', function(e) { $(document).on('click', '.int-link', function(e) {
e.preventDefault(); e.preventDefault();
$('.load-page').parent().removeClass('active'); $(document).find('.load-page').parent().removeClass('active');
$('.load-page').parent().css('left', '100%'); $(document).find('.load-page').parent().css('left', '100%');
history.pushState(null, null, $(this).find('a').attr('href')); history.pushState(null, null, $(this).find('a').attr('href'));
$('html').css('overflow', 'auto'); $('html').css('overflow', 'auto');
tlProduct.reverse(); tlProduct.reverse();
...@@ -667,7 +669,7 @@ var initFunction = function() { ...@@ -667,7 +669,7 @@ var initFunction = function() {
timer = setTimeout(function() { timer = setTimeout(function() {
onScrollCover(); onScrollCover();
}, 600); }, 330);
$(items).each(function() { $(items).each(function() {
var currLink = $(this); var currLink = $(this);
var refElement = $(currLink.attr("href")); var refElement = $(currLink.attr("href"));
...@@ -765,7 +767,7 @@ var initFunction = function() { ...@@ -765,7 +767,7 @@ var initFunction = function() {
$.fn.showSubmenu(); //Catalog subMenu $.fn.showSubmenu(); //Catalog subMenu
setTimeout(function() { setTimeout(function() {
onScrollCover(); onScrollCover();
}, 600); }, 330);
$('#fullpage').fullpageSlide(); //Stories $('#fullpage').fullpageSlide(); //Stories
$.fn.responsive(); $.fn.responsive();
$('.list-color-filter li').setBgColorList(); $('.list-color-filter li').setBgColorList();
......
...@@ -351,17 +351,17 @@ $(function(){ ...@@ -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.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); 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; //localStorage['from-site'] = true;
$('head').append($('.header-shop')); $('head').append($('.header-shop'));
var toLink = $(this).data('link'); var toLink = $(this).data('link');
$(document).attr("title", $(this).data('title')); $(document).attr("title", $(this).data('title'));
// $(document).attr("description", $(this).data('description')); // $(document).attr("description", $(this).data('description'));
// $.post(toLink, { fromSite: true}); // $.post(toLink, { fromSite: true});
//$.cookie("formSite", 1); //$.cookie("formSite", 1);
$('.load-page').parent().addClass('active'); $(document).find('.load-page').parent().addClass('active');
$('.load-page').load(toLink,{'ajax' : 1}, function(){ $(document).find('.load-page').parent().css('left',0);
$(document).find('.load-page').load(toLink,{'ajax' : 1}, function(){
history.pushState(null, null, toLink); history.pushState(null, null, toLink);
jQuery('.variations_form').wc_variation_form(); jQuery('.variations_form').wc_variation_form();
loadProductContent(); loadProductContent();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment