<button type="button" class="btn btn-sm btn-outline-success" (click)="openVerticallyCentered(content)">Create new</button>
<ng-template let-c="close" let-d="dismiss" #content>
<app-create-single-form [book]="activeBook" [user]="activeUser" [c]="c" [d]="d"></app-create-single-form>
</ng-template>
openVerticallyCentered(content): void {
this.modalService.open(content, {centered: true, size: 'lg'});
}
.header {
border-width: 0.5px;
border-color: #b5b7ba;
border-style: solid;
background-color: #dfdfdf;
height: 68px;
}
#octagon {
width: 100px;
height: 100px;
background: red;
position: relative;
}
#octagon:before {
content: "";
position: absolute;
top: 0;
left: 0;
border-bottom: 29px solid red;
border-left: 29px solid #eee;
border-right: 29px solid #eee;
width: 42px;
height: 0;
}
#octagon:after {
content: "";
position: absolute;
bottom: 0;
left: 0;
border-top: 29px solid red;
border-left: 29px solid #eee;
border-right: 29px solid #eee;
width: 42px;
height: 0;
}
У меня есть 3 одинаковых кусочка кода для 3 дивов со своими айди.- в коде нигде не упоминается айди
$('.panel-heading.slide a').click(function() {
if ($(this).hasClass('open')) {
/*...*/
} else {
/*...*/
}
});