Fletch Build Status

jQuery for Dart

Fletch is a Dart library aiming to provide similar functionality to jQuery. However, Fletch is not designed to be API-compatible with jQuery, instead preferring to take advantage of Dart features and design patterns.

For example, here is a snippet of jQuery:

$("<a>").text("Dart is cool!")
        .attr("href", "https://www.dartlang.org/")
        .style("font-weight", "bold")
        .appendTo("body");

Here is the equivalent code in Fletch:

$("<a>")..text = "Dart is cool!"
        ..attr["href"] = "https://www.dartlang.org/"
        ..style["font-weight"] = "bold"
        ..appendTo("body");

Fletch is very much a work in progress. So far, you can select/create elements, get/set text, get/set styles, add/remove classes, get/set attributes, and listen to/trigger events. Fletch should be considered alpha quality, as the public-facing API may change radically between releases.

Fletch is released under the ISC License, which is functionally equivalent to the BSD-2 and MIT licenses. See the LICENSE file for more information.

Libraries

fletch

Convenience functions for manipulating groups of HTML elements.