jQuery is dead and everyone agrees that you should use a modern approach like React instead (or, in the Rust/WASM world, Yew).
web-sys-query
allows you to port simple jQuery applications to
Rust/WASM with a familiar API instead of the rather complex
web-sys DOM API.
| jQuery: Attributes | Document
| Element
+ Collection
|
| -------------------- | --------------- | ------------------------------ |
| .addClass() | | addclass |
| .attr() | | attr, setattr |
| .hasClass() | | hasclass |
| .html() | | html, sethtml |
| .prop() | | |
| .removeAttr() | | removeattr |
| .removeClass() | | removeclass |
| .removeProp() | | |
| .toggleClass() | | toggleclass |
| .val() | | val, setval, *i32, *f64 |
| jQuery: Traversing | Document
| Element
+ Collection
|
| -------------------- | --------------- | ------------------------------ |
| .after() | | |
| .append() | | |
| .appendTo() | | |
| .before() | | |
| .clone() | | |
| .css() | | |
| .css() | | |
| .detach() | | |
| .empty() | | |
| .height() | | |
| .innerHeight() | | |
| .innerWidth() | | |
| .insertAfter() | | |
| .insertBefore() | | |
| $.cssNumber | | |
| $.htmlPrefilter() | | |
| .offset() | | |
| .outerHeight() | | |
| .outerWidth() | | |
| .position() | | |
| .prepend() | | |
| .prependTo() | | |
| .remove() | | |
| .replaceAll() | | |
| .replaceWith() | | |
| .scrollLeft() | | |
| .scrollTop() | | |
| .text() | | text, set_text |
| .unwrap() | | |
| .width() | | |
| .wrap() | | |
| .wrapAll() | | |
| .wrapInner() | | |
| jQuery: Traversing | Document
| Element
+ Collection
|
| -------------------- | --------------- | ------------------------------ |
| .add() | | |
| .addBack() | | |
| ~.andSelf()~ | - | - |
| .children() | children | children |
| .closest() | | |
| .contents() | | |
| .each() | | |
| .end() | | |
| .eq() | | |
| .even() | | |
| .filter() | | |
| .find() | find | find |
| .first() | | first |
| .has() | | |
| .is() | | |
| .last() | | last |
| .map() | | |
| .next() | | next |
| .nextAll() | | |
| .nextUntil() | | |
| .not() | | |
| .odd() | | |
| .offsetParent() | | |
| .parent() | | parent |
| .parents() | | |
| .parentsUntil() | | |
| .prev() | | prev |
| .prevAll() | | |
| .prevUntil() | | |
| .siblings() | | |
| .slice() | | |
Licensed under an OpenBSD-ISC-style license, see LICENSE for details.