2
I have 3 Divs and would like to manipulate them with buttons. Depending on the button, 2 Divs will hide and only one will appear.
<div ui-view>
<div class="box1">
conteudo
<div>
<button ng-click="Box2()">Funcao2</button>
<button ng-click="Box3()">Funcao3</button>
</div>
</div>
<div class="box-2"
conteudo
<div>
<button ng-click="Voltar()">Voltar</button>
</div>
</div>
<div class="box-3" >
conteudo
<div>
<button ng-click="Voltar()">Voltar</button>
</div>
</div>
I suggest you speak a [tour] to better understand how the site works :)
– Julio Henrique
An example code. Then on the box1 you have 2 buttons that will hide the box1 and show the box2 or box3. And on the other div show the box1
– Andersson OS
@Anderssonos welcome to the forum, you want to show/hide a
div
according to the button clicked, right? This is possible with Jquery, if so, I can leave an example as answer for you.– Jorge.M
@Jorge Is it only possible to do it in Jquery? In angular it is not possible? I was using ng-if but I cannot manipulate the Divs in clicks functions.
– Andersson OS