1
I have a list with 3 elements and 3 Divs.
<ul>
<li>Todos</li>
<li>elemento 1</li>
<li>elemento 2</li>
<li>elemento 3</li>
</ul>
<div id="1">elemento 1</div>
<div id="2">elemento 2</div>
<div id="3">elemento 3</div>
What I’m trying to do is click on an element in the list and show the corresponding div and hide the other Ivs. Can someone show me some ways to do this with jquery?
Thanks André! Served yes. I modified the code as I would show all the elements?
– user20360
@ewertonorg you say show all the Divs again? Type reset the filter?
– André Ribeiro
Exactly, when I click on the 'all' option and shows all the Divs I had before.
– user20360
@ewertonorg edited my answer to add this feature. Take a look there.
– André Ribeiro
vlw André, +1 for you! D
– user20360