Coder Social home page Coder Social logo

lukasdrgon / selector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datasilk/selector

0.0 2.0 0.0 92 KB

A micro JavaScript library used as a replacement for jQuery, weighing in at nearly 5KB.

License: MIT License

JavaScript 91.46% HTML 5.30% CSS 3.24%

selector's Introduction

Selector

A micro JavaScript library used as a replacement for jQuery, weighing in at nearly 5KB.

The aim of this project is to build a library that can be used to replace jQuery. The challenge will be to shrink the overall filesize of the library, keeping the minified, gzip compressed file under 5KB while simultaniously adding more support for jQuery features. The ultimate goal is to have a modern library that runs faster than jQuery under stress.

View Demo

Add to your project via public CDN from jsDelivr

https://cdn.jsdelivr.net/selectorjs/0.9.12/selector.min.js

File size comparison between jQuery and selector.js

Library Selector.js jQuery 3.2 jQuery 3.2 Slim
Uncompressed 68K 271K 217K
Minified 16K 84.5K 68K
Minified & Gzipped 4.8K 28.6K 22.7K

Supported jQuery selector functions

  • add
  • addClass
  • after
  • animate (requires Velocity.js)
  • append
  • attr
  • before
  • children
  • closest
  • css
  • each
  • empty
  • eq
  • filter
  • find
  • first
  • get
  • has
  • hasClass
  • height
  • hide
  • hover
  • html
  • index
  • innerHeight
  • innerWidth
  • is
  • last
  • map
  • next
  • not
  • off
  • offset
  • offsetParent
  • on
  • parent
  • parents
  • position
  • prepend
  • prev
  • prop
  • push (*pushStack)
  • ready
  • remove
  • removeAttr
  • removeClass
  • removeProp
  • serialize
  • show
  • siblings
  • slice
  • stop (requires Velocity.js)
  • toggle
  • toggleClass
  • val
  • width

Supported jQuery objects

  • $

Supported jQuery functions

  • $.ajax
  • $.extend

Unsupported jQuery functionality

  • jQuery object
  • All jQuery plugins
  • jQuery UI
  • jQuery.fx
  • Deprecated functions
  • More...

Disclaimer

This project is in beta and has been tested in Chrome 51+, IE8+ (using ie-shim.js), Safari 9+, and iOS 6+. Use at your own risk.

NOTES

  • *pushStack is now called push

selector's People

Contributors

markentingh avatar

Watchers

James Cloos avatar Lukas Drgon 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.