Are You ready? / jQuery struggle

$(function() { console.log( “ready!” ); }); is the short form for: $( document ).ready(function() { console.log( “ready!” ); }); Very unintuitive, this does not work: $(“input#myInput”).bind(“change”, function(){ }); Instead of “change” You have to use “input” $(“input#myInput”).bind(“input”, function(){ });

Inefficient jQuery Selectors

My PyCharm IDE warns me if I use inefficient jQuery selectors: As I am a bit nosy I wanted to know “how” inefficient these selectors are. So I compared the inefficient $(“#items tbody”); with the optimized $(“#items”).find(“tbody”); Here is the test code: window.onload = function () { test(“unoptimized”, function () { for(var i = 0;…