GithubHelp home page GithubHelp logo

vipul1306 / ajquery.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coolaj86/ajquery.js

0.0 0.0 0.0 25 KB

The fastest, most lightweight, least dependency jQuery alternative.

Home Page: https://twitter.com/coolaj86/status/1303386788119998464

License: Mozilla Public License 2.0

JavaScript 73.07% HTML 26.93%

ajquery.js's Introduction

The fastest, most lightweight, fewest dependency jQuery alternative.

Development Build: 145B (with comments)
Production Build: 103B (min + gz)

Install

<script src="https://unpkg.com/ajquery"></script>

Example Usage

Provides modern, advanced CSS4-compatible query selection:

console.log("innerText:", $("p:nth-child(2").innerText);

API

$(selector, [rootElement])

Selects the first matching HTML element only (or null):

const body = $("body");
const div1 = $("div", body);

$$(selector, [rootElement])

Selects all matching elements (or an empty NodeList):

const head = $("head");
const stylesheets = $$('link[rel="stylesheet"]', head).map(console.log);

Benchmarks

ajquery-benchmarks

Compatibility

Written entirely in modern ECMAScript 3, and directly transpilable into ES5, ES6 and beyond (up to ES11) via Webpack, Babel, Rollup, React Native, and AWS InfiniDash.

Works in all browsers in living memory.

See the full Browser Compatibility Matrix on MDN.

ajquery.js's People

Contributors

nickkelly1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.