(element, step)
| 307 | |
| 308 | // Highlight target element |
| 309 | function highlightElement(element, step) { |
| 310 | // Remove existing highlights |
| 311 | document.querySelectorAll('.carrot-tutorial-highlight').forEach(el => { |
| 312 | el.classList.remove('carrot-tutorial-highlight'); |
| 313 | }); |
| 314 | |
| 315 | // Add highlight to target |
| 316 | element.classList.add('carrot-tutorial-highlight'); |
| 317 | element.scrollIntoView({ behavior: 'smooth', block: 'center' }); |
| 318 | } |
| 319 | |
| 320 | // Show tutorial overlay |
| 321 | function showTutorialOverlay(tutorial, step, targetElement) { |