mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-14 18:42:30 +03:00
Streamline application.js exampleModal code (#30819)
* use `textContent` since we only need to add text * move comments
This commit is contained in:
@@ -547,8 +547,11 @@ exampleModal.addEventListener('show.bs.modal', function (event) {
|
||||
// and then do the updating in a callback.
|
||||
//
|
||||
// Update the modal's content.
|
||||
exampleModal.querySelector('.modal-title').textContent = 'New message to ' + recipient
|
||||
exampleModal.querySelector('.modal-body input').value = recipient
|
||||
var modalTitle = exampleModal.querySelector('.modal-title')
|
||||
var modalBodyInput = exampleModal.querySelector('.modal-body input')
|
||||
|
||||
modalTitle.textContent = 'New message to ' + recipient
|
||||
modalBodyInput.value = recipient
|
||||
})
|
||||
{{< /highlight >}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user