// ----- confetti (simple vanilla) ----- function triggerConfetti() if (typeof window.confetti === 'function') window.confetti( particleCount: 180, spread: 100, origin: y: 0.6 , startVelocity: 20, colors: ['#ff3366', '#ffb347', '#ff6f91'] ); setTimeout(() => window.confetti( particleCount: 100, spread: 70, origin: y: 0.4, x: 0.3 , startVelocity: 15 ); , 150); else // fallback confetti - simple canvas based const canvas = document.createElement('canvas'); canvas.style.position = 'fixed'; canvas.style.top = '0'; canvas.style.left = '0'; canvas.style.width = '100%'; canvas.style.height = '100%'; canvas.style.pointerEvents = 'none'; canvas.style.zIndex = '9999'; document.body.appendChild(canvas); const myConfetti = new ConfettiGenerator( target: canvas, max: 200, size: 1.2, colors: [[255,51,102],[255,180,71],[255,111,145]] ); myConfetti.render(); setTimeout(() => document.body.removeChild(canvas); , 2800);
// ---------- YES BUTTON HANDLER (main event) ---------- function onYes() if(yesBtn.disabled) return; // already accepted showAcceptance(); index of mujhse shaadi karogi
.subhead font-size: 1.2rem; color: #c74b5e; margin-bottom: 2rem; font-style: italic; font-weight: 500; origin: y: 0.6
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title>Mujhse Shaadi Karogi? | Will You Marry Me?</title> <style> * margin: 0; padding: 0; box-sizing: border-box; user-select: none; /* avoid accidental text selection on buttons */ body background: linear-gradient(145deg, #f8b8c0 0%, #f06b7c 100%); min-height: 100vh; display: flex; justify-content: center; align-items: center; font-family: 'Segoe UI', 'Poppins', 'Dancing Script', cursive, system-ui, -apple-system, sans-serif; padding: 1rem; window.confetti( particleCount: 100
// ----- State for the "No" button trick (playful) ----- let noClickCount = 0; let originalNoText = noBtn.innerHTML; let moved = false;