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: Attributes | Document
| Element
+ Collection
|
| -------------------- | --------------- | ------------------------------ |
| ~.bind()~ | | |
| .blur() | | blur, setblur |
| .change() | | change, setchange |
| .click() | | click, setclick |
| .contextmenu() | | contextmenu, setcontextmenu |
| .dblclick() | | dblclick, setdblclick |
| ~.delegate()~ | | |
| ~.die()~ | | |
| ~.error()~ | | |
| .focus() | | focus, setfocus |
| .focusin() | | |
| .focusout() | | |
| .hover() | | |
| .keydown() | | keydown, setkeydown |
| .keypress() | | keypress, setkeypress |
| .keyup() | | keyup, setkeyup |
| ~.live()~ | | |
| .load() | | |
| .mousedown() | | mousedown, setmousedown |
| .mouseenter() | | mouseenter, setmouseenter |
| .mouseleave() | | mouseleave, setmouseleave |
| .mousemove() | | mousemove, setmousemove |
| .mouseout() | | mouseout, setmouseout |
| .mouseover() | | mouseover, setmouseover |
| .mouseup() | | mouseup, setmouseup |
| .off() | | setoff |
| .on() | | on, seton |
| .one() | | |
| .ready() | | |
| .resize() | | resize, setresize |
| .scroll() | | scroll, setscroll |
| .select() | | select, setselect |
| .submit() | | submit, setsubmit |
| ~.toggle()~ | | |
| .trigger() | | |
| .triggerHandler() | | |
| ~.unbind()~ | | |
| ~.undelegate()~ | | |
| ~.unload()~ | | |
| jQuery: Traversing | Document
| Element
+ Collection
|
| -------------------- | --------------- | ------------------------------ |
| .after() | | |
| .append() | | |
| .appendTo() | | |
| .before() | | |
| .clone() | | |
| .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() | | filter |
| .find() | find | find |
| .first() | | first |
| .has() | | has |
| .is() | | 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.