Да там в общем то интуитивно понятно:
$(document).off('mouseenter').on('mouseenter', '.product_list.grid.map li.ajax_block_product .product-container', function(e){
$(document).off('mouseleave').on('mouseleave', '.product_list.grid.map li.ajax_block_product .product-container', function(e){
типа так, потом третий блок:
$(document).on('click', '#grid', function(e){
e.preventDefault();
display('grid');
});
$(document).on('click', '#list', function(e){
e.preventDefault();
display('list');
});
$(document).on('click', '#map', function(e){
e.preventDefault();
display('map');
});
Далее надо бы вставить блок активации контейнера карты (3 контейнер) и вот здесь торможу:
else
{
$('ul.product_list').removeClass('list').addClass('map row');
$('.product_list > li').removeClass('col-xs-12').addClass('col-xs-12 col-sm-6 col-md-4');
$('.product_list > li').each(function(index, element) {
html = '';
html += '<div class="product-container">';
html += '<div class="left-block">' + $(element).find('.left-block').html() + '</div>';
html += '<div class="right-block">';
html += '<div class="product-flags">'+ $(element).find('.product-flags').html() + '</div>';
html += '<h5 itemprop="name">'+ $(element).find('h5').html() + '</h5>';
var rating = $(element).find('.comments_note').html(); // check : rating
if (rating != null) {
html += '<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="comments_note">'+ rating + '</div>';
}
html += '<p itemprop="description" class="product-desc">'+ $(element).find('.product-desc').html() + '</p>';
var price = $(element).find('.content_price').html(); // check : catalog mode is enabled
if (price != null) {
html += '<div class="content_price">'+ price + '</div>';
}
html += '<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="button-container">'+ $(element).find('.button-container').html() +'</div>';
var colorList = $(element).find('.color-list-container').html();
if (colorList != null) {
html += '<div class="color-list-container">'+ colorList +'</div>';
}
var availability = $(element).find('.availability').html(); // check : catalog mode is enabled
if (availability != null) {
html += '<span class="availability">'+ availability +'</span>';
}
html += '</div>';
html += '<div class="functional-buttons clearfix">' + $(element).find('.functional-buttons').html() + '</div>';
html += '</div>';
$(element).html(html);
});
$('.display').find('li#map').addClass('selected');
$('.display').find('li#list').removeAttr('class');
$('.display').find('li#grid').removeAttr('class');
$.totalStorage('display', 'map');
}
Кажется я как то сложно мыслю, должно быть как-то проще,
очистить окно от карточек товаров и легко вставить карту,
но не получается создать пустую страницу хедер, колонку
слева, футер, и в середину воткнуть скрипт.