How to switch between list and grid views

Hi,

I’m new to Ruby on Rails. My index view displays a list of products and I have a search function. I would like to offer the user the ability to view the list of products as a grid, so they would have an option between ‘List’ and ‘Grid’ views. Also, it is important that the view they would select is the same after they execute a search. Here’s an example of what I want to achieve: http://jsfiddle.net/v57JF/

Can someone please advice how I would go about doing this? Do I need to use javascript to accomplish this? Thanks.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.