Skip to content

Instantly share code, notes, and snippets.

@katyayu
Created January 15, 2018 15:37
Embed
What would you like to do?
{% javascript %}
jQuery(document).ready(function($) {
// PRODUCTS VIEW GRID/LIST
if ( typeof $.cookie('productSortView') == 'undefined' ) {
$.cookie('productSortView', 'grid', {path: '/'});
}
else if ( $.cookie('productSortView') == 'list' ) {
$('#view_grid').removeClass('active');
$('#view_list').addClass('active');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment