Welcome to select-js

select-js is a lightweight JavaScript library for simple and powerful DOM manipulation. With select-js, you can easily select, manipulate, and manage your HTML elements using a straightforward API.

View on GitHub View on npm

Quick Examples

Installation

To install select-js, use npm:

npm install @shanto-islam/select-js

or via CDN:

<script src="https://cdn.jsdelivr.net/npm/@shanto-islam/select-js/dist/select-js.min.js"></script>

Basic Example

const element = select('div');  // Selects the first <div> element
const elements = selectAll('.class-name');  // Selects all elements with class 'class-name'

Chaining Methods

select('p')
  .addClass('highlight')
  .setText('Updated content.')
  .addStyle({ color: 'red' })
  .on('mouseover', () => console.log('Hovered!'));

Get Started

For more examples and detailed usage, check out the documentation.