closest

WebJar for closest

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

closest
Последняя версия

Последняя версия

0.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

closest
WebJar for closest
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/ForbesLindesay/closest

Скачать closest

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/closest/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>closest</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/closest/
implementation 'org.webjars.npm:closest:0.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/closest/
implementation ("org.webjars.npm:closest:0.0.1")
'org.webjars.npm:closest:jar:0.0.1'
<dependency org="org.webjars.npm" name="closest" rev="0.0.1">
  <artifact name="closest" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='closest', version='0.0.1')
)
libraryDependencies += "org.webjars.npm" % "closest" % "0.0.1"
[org.webjars.npm/closest "0.0.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : matches-selector jar 0.0.1

Модули Проекта

Данный проект не имеет модулей.

Closest

Finds the closest parent that matches a selector. Like jQuery.fn.closest

Installation

$ npm install closest

API

closest(element, selector, checkSelf)

  • element - element to search from
  • selector - CSS selector to match parents
  • checkSelf
    • If falsey (default) it starts with the parent like $(element).closest(selector)
    • If truthy it starts with itself so would return element if it matches selector

Example:

var closest = require('closest');

closest(document.body, 'html') === document.documentElement
closest(document.body, 'body', true) === document.body
closest(document.documentElement, 'html') == null

License

MIT

Версии библиотеки

Версия
0.0.1