blackbox-ai-clone / script.js
Raikhan's picture
buatkan cloning website blackbox ai s
12ff5d9 verified
Raw
History Blame Contribute Delete
952 Bytes
document.addEventListener('DOMContentLoaded', () => {
// Initialize any global functionality here
// Example: Handle the code generation button click
const generateButtons = document.querySelectorAll('button.bg-accent');
generateButtons.forEach(button => {
button.addEventListener('click', () => {
const input = button.previousElementSibling;
if (input.value.trim() !== '') {
alert('Generating code based on: ' + input.value);
// In a real implementation, this would call an API
}
});
});
// Make code language buttons interactive
const langButtons = document.querySelectorAll('button.bg-gray-700');
langButtons.forEach(button => {
button.addEventListener('click', () => {
langButtons.forEach(btn => btn.classList.remove('bg-accent'));
button.classList.add('bg-accent');
});
});
});