DEV Community

Discussion on: Why and How we moved away from jQuery in our Web Application

Collapse
 
pantsstatuszero profile image
High Voltage Turkey

I'd added document.querySelector(".example") to your list. Gives you more jquery like querying.

w3schools.com/jsref/met_document_q...

Collapse
 
devcer profile image
Santosh Viswanatham

Yes. You are right. Also, If you want to select only the first element then getElementById have far better performance than the class selector or query selector. -> jsbench.me/jckff66u9z/1