Skip to content

Instantly share code, notes, and snippets.

@katyayu
Created January 15, 2018 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katyayu/592bd519d84bb48960472d828bee1653 to your computer and use it in GitHub Desktop.
Save katyayu/592bd519d84bb48960472d828bee1653 to your computer and use it in GitHub Desktop.
{% javascript %}
jQuery(document).ready(function($) {
// PRODUCTS VIEW GRID/LIST
if ( typeof $.cookie('productSortView') == 'undefined' ) {
$.cookie('productSortView', 'list', {path: '/'});
}
else if ( $.cookie('productSortView') == 'grid' ) {
$('#view_list').removeClass('active');
$('#view_grid').addClass('active');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment