Created
December 29, 2017 04:16
-
-
Save kamalinfo/c57b2cc9f0723d779797126e69bd5ca4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="product-tablist"> | |
<ul class="tab-style"> | |
<li class="active" data-view="grid-view"><i class="fa fa-th"></i></li> | |
<li data-view="list-view"><i class="fa fa-th-list"></i></li> | |
</ul> | |
</div> | |
//add archive product | |
<div class="product-bottom-area grid-view clearfix"> | |
add js file | |
/* Product Grid & List view */ | |
$('.tab-style > li').on('click', function(){ | |
var proView = $(this).data('view'); | |
$('.tab-style > li').removeClass('active'); | |
$(this).addClass('active'); | |
$('.product-bottom-area').removeClass('grid-view list-view').addClass(proView); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment