GitHub 저장소rikulo/dquery

dquery

jQuery의 Dart 버전입니다.

dquery 프로젝트 이미지
스타
54
포크
14
최근 푸시(UTC)
2025. 6. 9.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

DQuery

DQuery is a porting of jQuery in Dart.

Install from Dart Pub Repository

Include the following in your pubspec.yaml:

dependencies:
  dquery: any

Then run the Pub Package Manager in Dart Editor (Tool > Pub Install). If you are using a different editor, run the command (comes with the Dart SDK):

pub install

Usage

You can create a query object by selector. With context provided, the query will be based on different element.

// selects all elements containing 'active' in CSS class
ElementQuery $elems = $('.active');

// selects all descendant elements of div containing 'active' in CSS class
ElementQuery $elems = $('.active', div);

It implements List.

$('.active')[0];
$('.active').isEmpty;
for (Element e in $('.active')) { ... }

Create another query object with traversing API, including find, closest, parent, children.

$('.active').closest('ul');
$('#myDiv').find('a.btn');

Manipulate selected elements.

$('.active').removeClass('active');
$('.fade').hide();

Register event handlers on queried elements, or trigger an event by API.

$('#myBtn').on('click', (QueryEvent e) {
	...
});
$('#myBtn').trigger('click', data: 'my data');

There are query objects of Document and Window too.

Query $doc = $document();
Query $win = $window();

Check the API reference for more features.

Comparison to jQuery

See here.

Notes to Contributors

Test and Debug

You are welcome to submit bugs and feature requests. Or even better if you can fix or implement them!

Fork DQuery

If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.

Please be aware that one of Rikulo's design goals is to keep the sphere of API as neat and consistency as possible. Strong enhancement always demands greater consensus.

If you are new to Git or GitHub, please read this guide first.

Who Uses

  • Quire - a simple, collaborative, multi-level task management tool.
  • Keikai - a sophisticated spreadsheet for big data
rikulo GitHub avatar
GitHub 작성자

rikulo ↗

언어DartHTMLShellsed

분류

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗