Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 2 days ago
JSON representation

Get the deepest children of each element in the set of matched elements, optionally filtered by a selector.

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 ''
```