https://github.com/martinille/jquery.deepest.js
Get the deepest children of each element in the set of matched elements, optionally filtered by a selector.
https://github.com/martinille/jquery.deepest.js
dom javascript jquery jquery-element jquery-selector jquery-selectors
Last synced: 6 days ago
JSON representation
Get the deepest children of each element in the set of matched elements, optionally filtered by a selector.
- Host: GitHub
- URL: https://github.com/martinille/jquery.deepest.js
- Owner: martinille
- License: mit
- Created: 2022-12-27T06:13:21.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-06T20:27:26.000Z (almost 2 years ago)
- Last Synced: 2025-04-24T13:44:28.010Z (3 months ago)
- Topics: dom, javascript, jquery, jquery-element, jquery-selector, jquery-selectors
- Language: HTML
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jquery.deepest.js
A plugin that allows developers to access the deepest children of a DOM element, and is less than 1kb in size.
Retrieve the children at the deepest level of the DOM tree for each element in the set of matched elements, with the option to filter these children using a selector.
---
### Install with npm
```shell
npm i jquery.deepest.js
```---
### Usage
HTML content:
```html
```JavaScript:
```javascript
'
let $deepest1 = $("#test1").deepest();
console.log($deepest1); // returns JQuery element 'let $deepest2 = $("#test2").deepest('span');
console.log($deepest2); // returns JQuery element ''
```