Join Our AI Community
Create an account to share your AI tool experiences and help others make better choices.
Create Your Free Account
Why Create an Account?
Share Reviews
Help others by sharing your experience with AI tools
Build Your Profile
Showcase your expertise and contributions to the community
Earn Badges
Get recognition for helpful reviews and contributions
Save Favorites
Bookmark and organize your favorite AI tools
Get Updates
Receive personalized recommendations and updates
Join Community
Connect with other AI enthusiasts and professionals
document.addEventListener(‘DOMContentLoaded’, function() {
const loginTabBtn = document.getElementById(‘login-tab-btn’);
const registerTabBtn = document.getElementById(‘register-tab-btn’);
const loginFormContainer = document.getElementById(‘login-form-container’);
const registerFormContainer = document.getElementById(‘register-form-container’);
const userLoginForm = document.getElementById(‘user-login-form’);
const userRegisterForm = document.getElementById(‘user-register-form’);
// Tab switching
loginTabBtn.addEventListener(‘click’, function() {
loginFormContainer.style.display = ‘block’;
registerFormContainer.style.display = ‘none’;
this.style.background = ‘white’;
this.style.color = ‘#667eea’;
registerTabBtn.style.background = ‘rgba(255,255,255,0.2)’;
registerTabBtn.style.color = ‘white’;
});
registerTabBtn.addEventListener(‘click’, function() {
loginFormContainer.style.display = ‘none’;
registerFormContainer.style.display = ‘block’;
this.style.background = ‘white’;
this.style.color = ‘#667eea’;
loginTabBtn.style.background = ‘rgba(255,255,255,0.2)’;
loginTabBtn.style.color = ‘white’;
});
// Form submissions
userLoginForm.addEventListener(‘submit’, function(e) {
e.preventDefault();
console.log(‘Login attempt’);
// Show success message
const successMsg = document.getElementById(‘auth-success-message’);
successMsg.style.display = ‘block’;
// In production, this would send to WordPress authentication
setTimeout(() => {
// Redirect to dashboard
window.location.href = ‘#user-dashboard’;
}, 1500);
});
userRegisterForm.addEventListener(‘submit’, function(e) {
e.preventDefault();
const formData = new FormData(this);
console.log(‘Registration attempt’);
// Validate passwords match
const password = this.querySelector(‘input[type=”password”]’).value;
const confirmPassword = this.querySelectorAll(‘input[type=”password”]’)[1].value;
if (password !== confirmPassword) {
const errorMsg = document.getElementById(‘auth-error-message’);
errorMsg.style.display = ‘block’;
return;
}
// Show success message
const successMsg = document.getElementById(‘auth-success-message’);
successMsg.style.display = ‘block’;
// In production, this would register the user
setTimeout(() => {
window.location.href = ‘#user-dashboard’;
}, 1500);
});
});