Function els

  • Selects all HTML elements that match the provided CSS selector.

    Parameters

    • selectors: string

      A string containing one or more CSS selectors to match.

    Returns NodeListOf<HTMLElement>

    A NodeList of all HTML elements that match the specified selector.

    const buttons = els('button');
    buttons.forEach(button => {
    console.log('Button element:', button);
    });