in angular click button hide div and show div
<div *ngIf="div1">
ABC
</div>
<div *ngIf="div2">
DEF
</div>
<div *ngIf="div3">
GHI
</div>
<button (click)="div1Function()"></button>
<button (click)="div2Function()"></button>
<button (click)="div3Function()"></button>
in .ts file
div1:boolean=true;
div2:boolean=true;
div3:boolean=true;
div1Function(){
this.div1=true;
this.div2=false;
this.div3=false
}
div2Function(){
this.div2=true;
this.div1=false;
this.div3=false
}
div3Function(){
this.div3=true;
this.div2=false;
this.div1=false
}
Also in JavaScript:
- jQuery select elements by name
- jquery datepicker no past dates
- how to print NODE_PATH
- js last array element
- split every n character js
- js onclick open the phone application
- store data in browser javascript
- reverse a string program in javascript
- sttripe for payment in react native andorid
- axios response.json
- angular navigate using component
- js maximum number value
- use effect react
- switch statement in javascript
- javascript check for null variables
- action checkbox selected vue js
- live background react
- get the id of a div in jquery
- javascript clear text in textarea
- HIDE BROKEN IMAGES
- useeffect on update
- js rounding
- get client timezone offset in JavaScript
- angular import service