CHieuu's picture
https://unlucid.ai/ tạo giúp tôi 1 bản y hệt các chức năng
fcd9a7d verified
// Main application script
document.addEventListener('DOMContentLoaded', function() {
// Initialize tooltips
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Demo animation
const demoBox = document.querySelector('.animate-pulse');
if (demoBox) {
setTimeout(() => {
demoBox.innerHTML = `
<div class="mb-4">
<div class="h-4 bg-gray-700 rounded mb-2 w-full"></div>
<div class="h-4 bg-gray-700 rounded mb-2 w-5/6"></div>
<div class="h-4 bg-gray-700 rounded mb-2 w-2/3"></div>
</div>
<div class="flex">
<div class="h-3 w-3 rounded-full bg-blue-500 mr-2"></div>
<div class="h-3 w-20 bg-gray-700 rounded"></div>
</div>
`;
}, 3000);
}
});