In desktop html5 applications I write I always use jquery although I'm writing mobile html5 applications and I'm wondering if I should use jquery at all.
First, I'm curious about selectors. I have done experiments on jsfiddle and tested the speed difference between $('#item') and document.getElementById('item'). Statistically I've concluded that $('#item') is a slower than document.getElementById. For this reason I want to completely switch to writing my code without jQuery, however I read here on this question:
What's the difference between `on` and `live` or `bind`?
That when it comes to binding, using jQuery's .on() method is very efficient. Is jQuery's .on() method faster than addEventListener()? What about if I'm constantly adding and removing multiples of this div:
<div class="item"></div>
to the DOM. In normal javascript each time I add a new div with class item I have to rebind for that new div, but with .on() it does it for me automatically. Is this all more efficient?