How can I hide the word volver
and show it when the div
one with the class is opened collapse
and hide the search word, that is, when he div
does collapse
, "this open
" show the word return if it is not open
showing the search word, I have the following code
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div ng-controller="myCtrl">
<ul id="tab-list" class="nav nav-pills tab-menu tabs nav-search">
<li>
<a data-toggle="collapse" data-target="#rent-tab">Busqueda avanzada</a>
<a data-toggle="collapse" data-target="#rent-tab">Volver</a>
</li>
</ul>
<div id="rent-tab" class="collapse">
<div class="row">
<div class="col-sm-12">
<span>Esto es una prueba</span>
</div>
</div>
</div>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
});
</script>
</body>
</html>
.
You could do it like this:
NG-CLOAK EXPLANATION
ng-cloak
is an angular directive that prevents the elements from having a "flicker" when loading the page, when the example is loaded you can see the back button for a few seconds and then it hides when everything finishes loading correctly, the ng-cloak It is used to prevent that from happening.