Skip to content

ineeee/ayy.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

ayy.js

Selector library in 233 bytes (minified + gzip)

ayylmao

Browser support

Due to querySelector the min version is IE 8, Chrome 1 or Firefox 3.5.

Get it

Download ayy2.min.js.

Example

Given the following document:

<div id="main">
	<div class="article">
		<h3>Article #1</h3>
		<p>blahblahblah</p>
		<p>blahblahblah</p>
	</div>
	<div class="article">
		<h3>Article #2</h3>
		<p>something something irrelevant content</p>
	</div>
</div>

Select main container:

Ayy('#main')

All articles:

Ayy('.article', 'all')

It's basically document.querySelector, so feel free to use any CSS selector.

protip

Feeling adventurous? Clutter Extend the prototype of every html element and unlock amazing features™!

HTMLElement.prototype.Ayy = Ayy;

Ayy('#main').Ayy('.article').Ayy('p', 'tag')

About

selector library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published