Home

LightQuery

A lightweight jQuery alternative.

Doc

  • Installation

Simply import light-query.min.js into your HTML.

<script src="https://gitcdn.link/repo/Zenoo/LightQuery/master/light-query.min.js"></script>    
  • Methods

    • .add()
    • .addClass()
    • .after()
    • .append()
    • .appendTo()
    • .before()
    • .blur()
    • .children()
    • .clone()
    • .closest()
    • .css()
    • .detach()
    • .each()
    • .empty()
    • .eq()
    • .filter(callback) The callback follows function(item, index){ ... }
    • .first()
    • .get()
    • .has()
    • .hasClass()
    • .height()
    • .hide()
    • .html()
    • .index()
    • .insertAfter()
    • .insertBefore()
    • .is()
    • $.ajax() Uses AjaxSender
    • $.get() $.ajax() shorthand for simple GET requests
    • .last()
    • .next()
    • .nextAll()
    • .not()
    • .off()
    • .offset()
    • .parent()
    • .parents()
    • .prepend()
    • .prependTo()
    • .prev()
    • .prevAll()
    • .remove()
    • .removeAttr()
    • .removeClass()
    • .replaceAll()
    • .replaceWith()
    • .scrollLeft()
    • .scrollTop()
    • .serialize()
    • .serializeArray()
    • .show()
    • .siblings()
    • .slice()
    • .text()
    • .toggle()
    • .toggleClass()
    • .trigger()
    • .unwrap()
    • .val()
    • .width()
    • .wrap()
    • .wrapAll()
  • Not included

    • .addBack() Use more appropriate selectors instead
    • .ajaxComplete() Use $.ajax() instead
    • .ajaxError() Use $.ajax() instead
    • .ajaxSend() Use $.ajax() instead
    • .ajaxStart() Use $.ajax() instead
    • .ajaxStop() Use $.ajax() instead
    • .ajaxSuccess() Use $.ajax() instead
    • .andSelf() Use more appropriate selectors instead
    • .animate() Use CSS3 animations instead
    • .change() Use .on('change') or .trigger('change') instead
    • .clearQueue() There is no queue
    • .click() Use .on('click') or .trigger('click') instead
    • .data() Use .attr('data-...') instead
    • .dblclick() Use .on('dblclick') or .trigger('dblclick') instead
    • .delay() Use setTimeout() or CSS3 animations instead
    • .delegate() Use .on() instead
    • .dequeue() There is no queue
    • .die() Use .off() instead
    • .end() Use another query instead
    • .error() Use .on('error') instead
    • .fadeIn() Use classes and CSS transitions instead
    • .fadeOut() Use classes and CSS transitions instead
    • .fadeTo() Use classes and CSS transitions instead
    • .fadeToggle() Use classes and CSS transitions instead
    • .finish() Use CSS3 animations instead
    • .focus() Use .on('focus') or .trigger('focus') instead
    • .focusin() Use .on('focusin') instead
    • .focusout() Use .on('focusout') instead
    • .hover() Use .on('mouseenter') and .on('mouseleave') instead
    • .innerHeight() Use .height() instead
    • .innerWidth() Use .width() instead
    • $.each() Use for ... of or .forEach() instead
    • $.extend() Use Object.assign() instead
    • $.fn.extend() Use _$.prototype.XXX instead
    • $.getJSON() Use $.ajax() instead
    • $.getScript() Use $.ajax() instead
    • $.globalEval() Use proper coding instead
    • $.post() Use $.ajax() instead
    • .queue() There is no queue
    • .keydown() Use .on('keydown') or .trigger('keydown') instead
    • .keypress() Use .on('keypress') or .trigger('keypress') instead
    • .keyup() Use .on('keyup') or .trigger('keyup') instead
    • .live() Use .on() instead
    • .load() Use $.ajax() and .html() instead
    • .mousedown() Use .on('mousedown') or .trigger('mousedown') instead
    • .mouseenter() Use .on('mouseenter') or .trigger('mouseenter') instead
    • .mouseleave() Use .on('mouseleave') or .trigger('mouseleave') instead
    • .mousemove() Use .on('mousemove') or .trigger('mousemove') instead
    • .mouseout() Use .on('mouseout') or .trigger('mouseout') instead
    • .mouseover() Use .on('mouseover') or .trigger('mouseover') instead
    • .mouseup() Use .on('mouseup') or .trigger('mouseup') instead
    • .nextUntil() Use better queries instead
    • .offsetParent() Why would you ever need this
    • .one() Use .on() and .off() instead
    • .outerHeight() Use .height() and .css() instead
    • .outerWidth() Use .width() and .css() instead
    • .parentsUntil() Use .parents() and .not() instead
    • .prevUntil() Use better queries instead
    • .promise() There is no queue
    • .prop() Use .attr() instead
    • .pushStack() There is no stack
    • .queue() There is no queue
    • .ready() Use $(function(){ ... }) or $(() => { ... }) instead
    • .removeData() Use .removeAttr() instead
    • .removeProp() Use .removeAttr() instead
    • .resize() Use .on('resize') or .trigger('resize') instead
    • .scroll() Use .on('scroll') or .trigger('scroll') instead
    • .select() Use .on('select') or .trigger('select') instead
    • .size() Use .length instead
    • .slideDown() Use classes and CSS transitions instead
    • .slideToggle() Use classes and CSS transitions instead
    • .slideUp() Use classes and CSS transitions instead
    • .stop() Use CSS3 animations instead
    • .submit() Use .on('submit') or .trigger('submit') instead
    • .toArray() Use .get() instead
    • .triggerHandler() Use .trigger() instead
    • .unbind() Use .off() instead
    • .undelegate() Use .off() instead
    • .unload() Use .on('unload') instead
    • .wrapInner() Use .children().wrapAll() instead

Authors