mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
13 lines
388 B
JavaScript
13 lines
388 B
JavaScript
|
export function swapModal(selectorBefore, selectorAfter) {
|
||
|
const modalBefore = $(selectorBefore)
|
||
|
const modalAfter = $(selectorAfter)
|
||
|
|
||
|
// Disable the fade-out + fade-in animation when swapping the forms.
|
||
|
modalBefore.removeClass('fade')
|
||
|
modalAfter.removeClass('fade')
|
||
|
modalAfter.modal()
|
||
|
modalBefore.modal('hide')
|
||
|
modalBefore.addClass('fade')
|
||
|
modalAfter.addClass('fade')
|
||
|
}
|