How to add print button in Elementor with code

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024

Комментарии • 2

  • @developersakibur
    @developersakibur Месяц назад

    its awsome

  • @sudebkarmokar
    @sudebkarmokar  Месяц назад +1

    Here is the code :
    document.addEventListener('DOMContentLoaded', (event) => {
    const printButton = document.querySelector('.print-button');
    if (printButton) {
    printButton.addEventListener('click', function() {
    window.print();
    });
    } else {
    console.error('Print button not found');
    }
    });