Created
April 5, 2011 21:59
-
-
Save jboesch/904670 to your computer and use it in GitHub Desktop.
Super fast query engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 100x faster than Sizzle: https://github.com/jquery/sizzle | |
// 50x faster than Qwery: https://github.com/ded/qwery | |
function fastQueryQuicklySpeedyAndKingOfRapidness(selector){ | |
if(!document.querySelectorAll){ | |
alert('Sorry buddeh. Plz upgrade yur browsr to harness the real power of this awsome app i builded.'); | |
return; | |
} | |
return document.querySelectorAll(selector); | |
} | |
// HTML | |
<div class="holy-shit-that-was-fast"></div> | |
// JS | |
fastQueryQuicklySpeedyAndKingOfRapidness('.holy-shit-that-was-fast'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment