Skip to content

Instantly share code, notes, and snippets.

@PocketNinjaDesign
Created February 19, 2018 20:14
Show Gist options
  • Save PocketNinjaDesign/b7808126e97f319929674d09e4ac85d1 to your computer and use it in GitHub Desktop.
Save PocketNinjaDesign/b7808126e97f319929674d09e4ac85d1 to your computer and use it in GitHub Desktop.
jqlite most basic findLite method
// For when you just want a quick hack to find things using jqlite
// findVeryVeryLite :-P
/**
* @param {string} selector any 'element', '.class' or '#id'
* @returns {object} jqlite objects
* @description Finds 1 or many elements within a single element
*/
$.fn.findLite = function(selector) {
return $(this[0].querySelectorAll(selector));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment