dailyraisin / jqnice

jQuery like niceties, all in one place

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jqnice

jQuery like niceties, all in one place

Features

  • ES5

Example Usage

(function ($) {

  // given <div class="lorem"></div>
  $.hasClass(document.querySelector('.lorem'), 'ipsum'); //false

  $.addClass(document.querySelector('.lorem'), 'ipsum');
  // now <div class="lorem ipsum"></div>

  $.hasClass(document.querySelector('.lorem'), 'ipsum'); //true

  $.removeClass(document.querySelector('.lorem'), 'ipsum');
  // now <div class="lorem"></div>

  $.hasClass(document.querySelector('.lorem'), 'ipsum'); //false

}(jqnice));
(function ($) {
        var requestAnimFrame = $.requestAnimFrame;

        function render () {
            //your business logic
        }

        (function animloop () {
            requestAnimFrame(animloop);
            render();
        })();
}(jqnice));

About

jQuery like niceties, all in one place


Languages

Language:JavaScript 100.0%