fpd-auto-setup / script.js
kaidjuric's picture
FPD Auto-Setup Plugin v1.0.0
7466f9c verified
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');
});
}
});