I have a table and I want the user to pick how to view the table WITHOUT going to another url .. I want it all to be done by javascript and jquery
there is two types of view one is with pictures, the other is without pictures
the code for the the one with pictures is :
<ul>
<li style="float:right;"><img src="{$pictureurl}"/></li>
<li> {$sometext}</li>
<li>{$sometext}</li>
<li>{$sometext}</li>
</ul>
and the code for the non picture looks something like this :
<table>
<tr>
<th>{sometext}</th>
<th>{sometext}</th>
<th>{sometext}</th>
</tr>
<tr>
<td >{$sometext}</td>
<td >{$sometext}</td>
<td >{$sometext}</td>
</tr>
</table>
I am going to create to buttons one for the first view and one for the second view.. the problem is I do not know how to change the content from one to another.. is their a code that does this? what is it? and how to use it?
Thanks in advance for helping me 🙂
You can do something like this: fiddle