Hi all, Below is an example of switching between list and grid view using jQuery.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script> $( document ).ready(function() { $('.show-list').click(function(){ $('.wrapper').addClass('list-mode'); }); $('.hide-list').click(function(){ $('.wrapper').removeClass('list-mode'); }); }) </script>
If you want to use such switching between list and grid view as shown in above example then, follow/use the below scritp and html code.
Script:-
- $( document ).ready(function() {
- $('.show-list').click(function(){
- $('.wrapper').addClass('list-mode');
- });
For such more technology related Blogs like HTML, Javascript, Phonegap,iOS, Android, Mysql you can also visit Findnerd.
No comments:
Post a Comment