Spaces:
Running
Running
File size: 1,738 Bytes
7466f9c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | document.addEventListener('DOMContentLoaded', function() {
// Tooltip functionality
const tooltips = document.querySelectorAll('.tooltip');
tooltips.forEach(tooltip => {
tooltip.addEventListener('mouseenter', function() {
this.querySelector('.tooltip-text').style.visibility = 'visible';
this.querySelector('.tooltip-text').style.opacity = '1';
});
tooltip.addEventListener('mouseleave', function() {
this.querySelector('.tooltip-text').style.visibility = 'hidden';
this.querySelector('.tooltip-text').style.opacity = '0';
});
});
// Execute button click handler
const executeBtn = document.querySelector('.btn-primary');
if (executeBtn) {
executeBtn.addEventListener('click', function() {
alert('This would execute the FPD setup process. In a real plugin, this would make an AJAX call to WordPress.');
});
}
// Wizard navigation
const wizardBtns = document.querySelectorAll('.wizard-btn');
wizardBtns.forEach(btn => {
btn.addEventListener('click', function() {
// Remove active class from current active button
document.querySelector('.wizard-btn.active').classList.remove('active', 'pulse');
// Add active class to clicked button
this.classList.add('active', 'pulse');
alert('In a real plugin, this would navigate between wizard steps.');
});
});
// Settings button in header
const settingsBtn = document.querySelector('.settings-btn');
if (settingsBtn) {
settingsBtn.addEventListener('click', function() {
alert('Settings modal would open here');
});
}
}); |