master
parent
2dce75d449
commit
3fd5b9c2ed
|
@ -2,6 +2,15 @@
|
||||||
|
|
||||||
@section('head')
|
@section('head')
|
||||||
<link rel="stylesheet" href="{{storage('assets/libs/intl-tel-input-17.0.0/css/intlTelInput.min.css')}}">
|
<link rel="stylesheet" href="{{storage('assets/libs/intl-tel-input-17.0.0/css/intlTelInput.min.css')}}">
|
||||||
|
<style>
|
||||||
|
.form-anchor{
|
||||||
|
opacity:0;
|
||||||
|
}
|
||||||
|
.form-anchor.show{
|
||||||
|
transition: opacity 300ms;
|
||||||
|
opacity:1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
@ -222,7 +231,8 @@
|
||||||
// If target element is visible
|
// If target element is visible
|
||||||
if (entry.isIntersecting) {
|
if (entry.isIntersecting) {
|
||||||
// Remove the element to remove
|
// Remove the element to remove
|
||||||
elementToRemove.style.display = 'none';
|
elementToRemove.classList.remove('show');
|
||||||
|
setTimeout(() => elementToRemove.style.display = 'none', 300);
|
||||||
} else {
|
} else {
|
||||||
const fixedElementRect = elementToRemove.getBoundingClientRect();
|
const fixedElementRect = elementToRemove.getBoundingClientRect();
|
||||||
const referenceElementRect = targetElement.getBoundingClientRect();
|
const referenceElementRect = targetElement.getBoundingClientRect();
|
||||||
|
@ -230,9 +240,12 @@
|
||||||
if (fixedElementRect.bottom < referenceElementRect.top) {
|
if (fixedElementRect.bottom < referenceElementRect.top) {
|
||||||
// Show the element to remove
|
// Show the element to remove
|
||||||
elementToRemove.style.display = 'block';
|
elementToRemove.style.display = 'block';
|
||||||
|
setTimeout(() => elementToRemove.classList.add('show'), 300);
|
||||||
} else {
|
} else {
|
||||||
// Hide the element to remove
|
// Hide the element to remove
|
||||||
elementToRemove.style.display = 'none';
|
//elementToRemove.style.display = 'none';
|
||||||
|
elementToRemove.classList.remove('show');
|
||||||
|
setTimeout(() => elementToRemove.style.display = 'none', 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Stop observing once it's removed (optional)
|
// Stop observing once it's removed (optional)
|
||||||
|
|
Loading…
Reference in New Issue